2016-10-10 14 views
0

최신 JCL 2016-10-10 을 설치했으며 최신 JVCL을 설치하려고하지만 오류 메시지가 나타납니다.Delphi XE 10.1 JVCL 설치 실패

어떻게 설치할 수 있습니까?

Windows 10 Home (10.0.0)

JVCL 3.50.0.0

[Generating: Packages]

Generating packages for D24

Loaded template.dpk

Loaded template.dproj

Loaded template.rc

[Compiling: Packages]

[Compiling: JvCore240.bpl]

Embarcadero Delphi for Win32 compiler version 31.0

Copyright (c) 1983,2016 Embarcadero Technologies, Inc.

E:\DelphiComp\XE10.1\JVCL3-2016-10-10\run\JvAppIniStorage.pas(261) Error: E2361 Cannot access private symbol TMemIniFile.FSections

E:\DelphiComp\XE10.1\JVCL3-2016-10-10\run\JvAppIniStorage.pas(261) Warning: W1023 Comparing signed and unsigned types - widened both operands

E:\DelphiComp\XE10.1\JVCL3-2016-10-10\run\JvAppIniStorage.pas(261) Error: E2014 Statement expected, but expression of type 'Boolean' found

E:\DelphiComp\XE10.1\JVCL3-2016-10-10\run\JvAppIniStorage.pas(274) Error: E2361 Cannot access private symbol TMemIniFile.FSections

JvCore.dpk(2356) Fatal: F2063 Could not compile used unit 'JvAppIniStorage.pas'

+1

최신 버전을 설치하려고하지만 그렇지 않은 경우가 있습니다. 이 문제는 4 월에 수정되었습니다. 이것은 흔한 실수입니다. VCS를 사용하고 최신 정보를 얻는 방법을 알고 있는지 확인하십시오. –

답변

1

델파이 10.1 베를린 버전은 클래스 헬퍼를 통해 개인 회원 (How to access private methods without helpers? 참조)의 액세스를 제거했습니다. 그것은 TMemIniFile.FSections에 대한 액세스가 거부 될 때 볼 수있는 오류 메시지입니다. JvAppIniStorage.pas의 최신 코드를 보면

가,이 고정되어

{ 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의 첫 번째 필드로 선언 된 경우 작동하는 더러운 해킹입니다.

그리고 코드

:

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에 정의되어 있습니다.

+0

이것은 정말로 반란군의 해킹이 아닙니다. ...... –

+0

@DavidHeffernan, 아마 oop 관점에서 볼 수 있습니다. 그러나 실용적인 프로그래머는 어떤 옵션이든 사용합니다. –

+0

안녕하세요, David. 의견을 보내 주셔서 감사합니다. 그러나 나는 그것을 할 수 없다. –