Page 1 of 1
[patch]Compile error FPC 2.6.4 -dMSEgui
Posted: 27.05.2014, 08:54
by mse
Hi,
7.2 does not compile with FPC 2.6.4 -dMSEgui.
The attached patch fixes it, I don't know if it is correct.
Additional there is an invalid utf-8 sequence at line 100.
A patched version is here:
https://gitorious.org/mseuniverse/zeos-msegui
Martin
Re: [patch]Compile error FPC 2.6.4 -dMSEgui
Posted: 27.06.2014, 22:59
by EgonHugeist
Hi Martin,
did replace the nasty character. Patch done R3179 /testing-7.2
Do we really need the ZEncoding unit in ZCompatibility.pas? We did run into some trouble with FPC. FPC has some weired issus with circular references. We've been trying to broke the reference where ever we can (CodeTyphoon did report these issues)
Sorry for my long absence..
Michael
Re: [patch]Compile error FPC 2.6.4 -dMSEgui
Posted: 28.06.2014, 10:16
by mse
It does not compile without ZEncoding:
Code: Select all
Free Pascal Compiler version 2.6.5 [2014/05/31] for i386
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling mseide.pas
Compiling /home/mse/packs/standard/git/zeos/sourceforge/src/core/ZCompatibility.pas
ZCompatibility.pas(406,33) Warning: Some fields coming after "ZAlias" weren't initialized
ZCompatibility.pas(411,28) Warning: Some fields coming before "ClientCodePage" weren't initialized
ZCompatibility.pas(446,10) Warning: Some fields coming after "WriteFormatSettings" weren't initialized
ZCompatibility.pas(504,44) Error: Identifier not found "zCP_UTF8"
ZCompatibility.pas(510,44) Error: Identifier not found "zCP_UTF8"
ZCompatibility.pas(689) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
because of
Code: Select all
procedure TZCodePagedObject.SetConSettingsFromInfo(Info: TStrings);
begin
if Assigned(Info) and Assigned(FConSettings) then
begin
{$IFDEF UNICODE}
ConSettings.CTRL_CP := ZDefaultSystemCodePage;
if Info.values['controls_cp'] = 'GET_ACP' then
ConSettings.CPType := cGET_ACP
else
ConSettings.CPType := cCP_UTF16;
ConSettings.AutoEncode := True;
{$ELSE}
{$IF defined(MSWINDOWS) or defined(FPC_HAS_BUILTIN_WIDESTR_MANAGER) or defined(WITH_LCONVENCODING)}
ConSettings.AutoEncode := Info.Values['AutoEncodeStrings'] = 'ON'; //compatibitity Option for existing Applications;
{$ELSE}
ConSettings.AutoEncode := False;
{$IFEND}
if Info.values['controls_cp'] = 'GET_ACP' then
begin
ConSettings.CPType := cGET_ACP;
ConSettings.CTRL_CP := ZDefaultSystemCodePage;
end
else
if Info.values['controls_cp'] = 'CP_UTF8' then
begin
ConSettings.CPType := cCP_UTF8;
ConSettings.CTRL_CP := 65001;
end
else
if Info.values['controls_cp'] = 'CP_UTF16' then
begin
{$IF defined(MSWINDOWS) or defined(FPC_HAS_BUILTIN_WIDESTR_MANAGER) or defined(WITH_LCONVENCODING)}
ConSettings.CPType := {$IFDEF WITH_WIDEFIELDS}cCP_UTF16{$ELSE}cCP_UTF8{$ENDIF};
ConSettings.CTRL_CP := ZDefaultSystemCodePage;
ConSettings.AutoEncode := True;
{$ELSE}
if ConSettings.ClientCodePage.Encoding = ceUTF8 then
begin
ConSettings.CPType := {$IFDEF WITH_WIDEFIELDS}cCP_UTF16{$ELSE}cCP_UTF8{$ENDIF};
ConSettings.CTRL_CP := zCP_UTF8; <<<<<<<<----------
ConSettings.AutoEncode := True;
end
else
begin
ConSettings.CPType := cCP_UTF8;
ConSettings.CTRL_CP := zCP_UTF8;
ConSettings.AutoEncode := False;
end;
{$IFEND}
Maybe there is another solution?
Martin
Re: [patch]Compile error FPC 2.6.4 -dMSEgui
Posted: 28.06.2014, 23:12
by EgonHugeist
Thanx again, Martin.
Jup, just replaced zCP_UTF8 with generic value 65001. This should fix last reference to ZEncoding, hopefully??
Patch done R3180 /testing-7.2 (SVN)
Hope it works now?
Re: [patch]Compile error FPC 2.6.4 -dMSEgui
Posted: 29.06.2014, 11:30
by mse
Works again, thanks.