首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DelphiXE10.1 JVCL安装失败

DelphiXE10.1 JVCL安装失败
EN

Stack Overflow用户
提问于 2016-10-10 23:20:18
回答 1查看 643关注 0票数 0

我已经安装了最新的JCL 2016-10-10,我想安装最新的JVCL,但是我收到了一些错误消息。

我怎么能安装它?

Windows 10家庭(10.0.0) JVCL 3.50.0.0 生成:包 生成D24软件包 加载template.dpk 加载template.dproj 加载template.rc 汇编:软件包 用于Win32编译器31.0版本的Embarcadero Delphi 版权(c) 1983,2016 Embarcadero技术公司。 E:\DelphiComp\XE10.1\JVCL3-2016-10-10\run\JvAppIniStorage.pas(261)错误: E2361无法访问私有符号TMemIniFile.FSections E:\DelphiComp\XE10.1\JVCL3-2016-10-10\run\JvAppIniStorage.pas(261)警告:比较有符号类型和无符号类型的W1023 -扩大了两个操作数 E:\DelphiComp\XE10.1\JVCL3-2016-10-10\run\JvAppIniStorage.pas(261)错误:预期的E2014语句,但是找到了类型'Boolean‘的表达式 E:\DelphiComp\XE10.1\JVCL3-2016-10-10\run\JvAppIniStorage.pas(274)错误: E2361无法访问私有符号TMemIniFile.FSections JvCore.dpk(2356)致命: F2063无法编译已使用的单元“JvAppIniStorage.pas”

EN

回答 1

Stack Overflow用户

发布于 2016-10-11 07:56:27

Delphi10.1柏林版本取消了私人成员通过类助手访问的权限(请参阅如何在没有助手的情况下访问私有方法?)。这是在拒绝对TMemIniFile.FSections的访问时可以看到的错误消息。

看看JvAppIniStorage.pas的最新代码,这是固定的:

代码语言:javascript
复制
{ Optimization of TCustomIniFile.ValueExists.
  Note that this is a dirty hack, a better way would be to rewrite TMemIniFile;
  especially expose FSections. }
{$IFDEF DELPHI2009_UP}
type
  TMemIniFileAccess = class(TCustomIniFile)
  {$IFDEF RTL310_UP} // 10.1 Berlin removed the access to private fields
    {$IFDEF RTL320_UP}
      {$MESSAGE WARN 'Check that the new RTL still has FSections as the first member of TMemIniFile'}
    {$ENDIF RTL320_UP}
  private
    FSections: TStringList;
  {$ENDIF RTL310_UP}
  end;

正如代码注释中所述,如果FSections仍然被声明为TCustomIniFile中的第一个字段,则这是一种肮脏的攻击。

在代码中:

代码语言:javascript
复制
function TMemIniFileHelper.SectionExists(const Section: string): Boolean;
begin
  {$IFDEF RTL310_UP} // 10.1 Berlin removed the access to private fields
  Result := TMemIniFileAccess(Self).FSections.IndexOf(Section) >= 0;
  {$ELSE}
  Result := Self.FSections.IndexOf(Section) >= 0;
  {$ENDIF RTL310_UP}
end;

确保您有jvcl的最新源代码并重新编译。注意,符号RTL310_UP是在jedi.inc中定义的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39968194

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档