Unable to compile in Delphi 10.3
Danjb1 opened this issue · comments
In Delphi 10.3 Community Edition, trying to compile the RXXPacker project:
Checking project dependencies...
Compiling RXXPacker.dproj (Debug, Win32)
brcc32 command line for "RXXPacker.vrc"
d:\program files (x86)\embarcadero\studio\20.0\bin\cgrc.exe -c65001 RXXPacker.vrc -foRXXPacker.res
dcc32 command line for "RXXPacker.dpr"
d:\program files (x86)\embarcadero\studio\20.0\bin\dcc32.exe -$W+ -$YD --no-config -M -Q -TX.exe -AGenerics.Collections=System.Generics.Collections;
Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I..\..;
..\..\src\common;"..\..\src\common\Overbyte ICS 8";..\..\src\common\pascalscript\Source;..\..\src;..\..\src\ai;..\..\src\gui;..\..\src\gui\pages_game;
..\..\src\gui\pages_maped;..\..\src\gui\pages_menu;..\..\src\hands;..\..\src\houses;..\..\src\net;..\..\src\render;..\..\src\res;..\..\src\terrain;
..\..\src\units;"d:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";D:\Danjb\Documents\Embarcadero\Studio\20.0\Imports;"d:\program
files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"d:\program files
(x86)\embarcadero\studio\20.0\include" -LEC:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl
-LNC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NU..\..\dcu -NSWinapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;Vcl;
Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap; -O..\..;..\..\src\common;"..\..\src\common\Overbyte ICS 8";
..\..\src\common\pascalscript\Source;..\..\src;..\..\src\ai;..\..\src\gui;..\..\src\gui\pages_game;..\..\src\gui\pages_maped;..\..\src\gui\pages_menu;
..\..\src\hands;..\..\src\houses;..\..\src\net;..\..\src\render;..\..\src\res;..\..\src\terrain;..\..\src\units;"d:\program files
(x86)\embarcadero\studio\20.0\lib\Win32\release";D:\Danjb\Documents\Embarcadero\Studio\20.0\Imports;"d:\program files
(x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"d:\program files (x86)\embarcadero\studio\20.0\include"
-R..\..;..\..\src\common;"..\..\src\common\Overbyte ICS 8";..\..\src\common\pascalscript\Source;..\..\src;..\..\src\ai;..\..\src\gui;
..\..\src\gui\pages_game;..\..\src\gui\pages_maped;..\..\src\gui\pages_menu;..\..\src\hands;..\..\src\houses;..\..\src\net;..\..\src\render;
..\..\src\res;..\..\src\terrain;..\..\src\units;"d:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";
D:\Danjb\Documents\Embarcadero\Studio\20.0\Imports;"d:\program files (x86)\embarcadero\studio\20.0\Imports";
C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"d:\program files (x86)\embarcadero\studio\20.0\include" -U..\..;..\..\src\common;
"..\..\src\common\Overbyte ICS 8";..\..\src\common\pascalscript\Source;..\..\src;..\..\src\ai;..\..\src\gui;..\..\src\gui\pages_game;
..\..\src\gui\pages_maped;..\..\src\gui\pages_menu;..\..\src\hands;..\..\src\houses;..\..\src\net;..\..\src\render;..\..\src\res;..\..\src\terrain;
..\..\src\units;"d:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";D:\Danjb\Documents\Embarcadero\Studio\20.0\Imports;"d:\program
files (x86)\embarcadero\studio\20.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"d:\program files
(x86)\embarcadero\studio\20.0\include" -V -VN -K00400000 -NBC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp
-NHC:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32 -NO..\..\dcu RXXPacker.dpr
[dcc32 Error] KM_Utils.pas(661): E2267 Previous declaration of 'KaMRandom' was not marked with the 'overload' directive
[dcc32 Error] KM_Utils.pas(783): E2267 Previous declaration of 'StrSubstring' was not marked with the 'overload' directive
[dcc32 Error] KM_Utils.pas(836): E2029 ';' expected but '.' found
[dcc32 Error] KM_Utils.pas(838): E2029 Declaration expected but end of file found
[dcc32 Error] KM_Utils.pas(15): E2065 Unsatisfied forward or external declaration: 'KMGetCursorDirection'
[dcc32 Error] KM_Utils.pas(17): E2065 Unsatisfied forward or external declaration: 'GetPositionInGroup2'
[dcc32 Error] KM_Utils.pas(18): E2065 Unsatisfied forward or external declaration: 'GetPositionFromIndex'
[dcc32 Error] KM_Utils.pas(20): E2065 Unsatisfied forward or external declaration: 'FixDelim'
[dcc32 Error] KM_Utils.pas(22): E2065 Unsatisfied forward or external declaration: 'ConvertRGB2HSB'
[dcc32 Error] KM_Utils.pas(23): E2065 Unsatisfied forward or external declaration: 'ConvertHSB2RGB'
[dcc32 Error] KM_Utils.pas(24): E2065 Unsatisfied forward or external declaration: 'MultiplyBrightnessByFactor'
[dcc32 Error] KM_Utils.pas(25): E2065 Unsatisfied forward or external declaration: 'ReduceBrightness'
[dcc32 Error] KM_Utils.pas(26): E2065 Unsatisfied forward or external declaration: 'GetPingColor'
[dcc32 Error] KM_Utils.pas(27): E2065 Unsatisfied forward or external declaration: 'GetFPSColor'
[dcc32 Error] KM_Utils.pas(28): E2065 Unsatisfied forward or external declaration: 'FlagColorToTextColor'
[dcc32 Error] KM_Utils.pas(29): E2065 Unsatisfied forward or external declaration: 'TimeToString'
[dcc32 Error] KM_Utils.pas(30): E2065 Unsatisfied forward or external declaration: 'WrapColor'
[dcc32 Error] KM_Utils.pas(31): E2065 Unsatisfied forward or external declaration: 'WrapColorA'
[dcc32 Error] KM_Utils.pas(32): E2065 Unsatisfied forward or external declaration: 'StripColor'
[dcc32 Error] KM_Utils.pas(33): E2065 Unsatisfied forward or external declaration: 'FindMPColor'
[dcc32 Error] KM_Utils.pas(35): E2065 Unsatisfied forward or external declaration: 'ParseDelimited'
[dcc32 Error] KM_Utils.pas(37): E2065 Unsatisfied forward or external declaration: 'SetKaMSeed'
[dcc32 Error] KM_Utils.pas(38): E2065 Unsatisfied forward or external declaration: 'GetKaMSeed'
[dcc32 Error] KM_Utils.pas(39): E2065 Unsatisfied forward or external declaration: 'KaMRandom'
[dcc32 Error] KM_Utils.pas(40): E2065 Unsatisfied forward or external declaration: 'KaMRandom'
[dcc32 Error] KM_Utils.pas(41): E2065 Unsatisfied forward or external declaration: 'KaMRandomS'
[dcc32 Error] KM_Utils.pas(42): E2065 Unsatisfied forward or external declaration: 'KaMRandomS'
[dcc32 Error] KM_Utils.pas(49): E2065 Unsatisfied forward or external declaration: 'MapSizeIndex'
[dcc32 Error] KM_Utils.pas(50): E2065 Unsatisfied forward or external declaration: 'MapSizeText'
[dcc32 Error] KM_Utils.pas(60): E2065 Unsatisfied forward or external declaration: 'GetFileDirName'
[dcc32 Error] KM_Utils.pas(62): E2065 Unsatisfied forward or external declaration: 'GetNoColorMarkupText'
[dcc32 Error] KM_Utils.pas(64): E2065 Unsatisfied forward or external declaration: 'DeleteDoubleSpaces'
[dcc32 Error] KM_Utils.pas(66): E2065 Unsatisfied forward or external declaration: 'GetMultiplicator'
[dcc32 Error] KM_Utils.pas(69): E2065 Unsatisfied forward or external declaration: 'StrIndexOf'
[dcc32 Error] KM_Utils.pas(70): E2065 Unsatisfied forward or external declaration: 'StrLastIndexOf'
[dcc32 Error] KM_Utils.pas(71): E2065 Unsatisfied forward or external declaration: 'StrSubstring'
[dcc32 Error] KM_Utils.pas(72): E2065 Unsatisfied forward or external declaration: 'StrSubstring'
[dcc32 Error] KM_Utils.pas(73): E2065 Unsatisfied forward or external declaration: 'StrContains'
[dcc32 Error] KM_Utils.pas(74): E2065 Unsatisfied forward or external declaration: 'StrTrimRight'
[dcc32 Error] KM_Utils.pas(75): E2065 Unsatisfied forward or external declaration: 'StrSplit'
[dcc32 Fatal Error] KM_Log.pas(43): F2063 Could not compile used unit 'KM_Utils.pas'
Failed
Elapsed time: 00:00:01.4
Am I missing something here?
After adding this line to the .inc file, the errors go away:
{$IFDEF VER330} {$DEFINE WDC} {$ENDIF} //Define Windows Delphi 10.3 Rio compiler
However, I still get a handful of errors when trying to build the KaM_Remake project itself:
[dcc32 Hint] OverbyteIcsWinsockImpl.inc(279): H2077 Value assigned to 'GetProc' never used
[dcc32 Hint] OverbyteIcsWinsockImpl.inc(311): H2077 Value assigned to 'GetProc2' never used
[dcc32 Hint] OverbyteIcsWinsockImpl.inc(339): H2077 Value assigned to 'GetProc3' never used
[dcc32 Warning] OverbyteIcsWndControl.pas(124): W1054 You are compiling ICS with an unknown and untested compiler version!
[dcc32 Hint] OverbyteIcsWSocket.pas(13439): H2077 Value assigned to 'NewSessionCallback' never used
[dcc32 Hint] OverbyteIcsWSocket.pas(13494): H2077 Value assigned to 'GetSessionCallback' never used
[dcc32 Hint] OverbyteIcsWSocket.pas(15135): H2077 Value assigned to 'Entry' never used
[dcc32 Warning] uPSUtils.pas(735): W1057 Implicit string cast from 'ShortString' to 'string'
[dcc32 Warning] uPSUtils.pas(744): W1057 Implicit string cast from 'ShortString' to 'string'
[dcc32 Warning] uPSUtils.pas(1043): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1059): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Error] uPSUtils.pas(1159): E2010 Incompatible types: 'Char' and 'AnsiChar'
[dcc32 Warning] uPSUtils.pas(1164): W1058 Implicit string cast with potential data loss from 'string' to 'ShortString'
[dcc32 Error] uPSUtils.pas(1165): E2015 Operator not applicable to this operand type
[dcc32 Warning] uPSUtils.pas(1214): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1223): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Error] uPSUtils.pas(1224): E2064 Left side cannot be assigned to
[dcc32 Warning] uPSUtils.pas(1227): W1058 Implicit string cast with potential data loss from 'string' to 'ShortString'
[dcc32 Warning] uPSUtils.pas(1236): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1247): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1257): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1257): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1258): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1258): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1262): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1266): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1307): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1314): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1317): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Warning] uPSUtils.pas(1498): W1050 WideChar reduced to byte char in set expressions. Consider using 'CharInSet' function in 'SysUtils' unit.
[dcc32 Fatal Error] uPSRuntime.pas(1206): F2063 Could not compile used unit 'uPSUtils.pas'
Yeah... Every new release of the compiler will require you to add the version to the list of WDC defines.. :)
uPSUtils is part of PascalScript, this is not maintained by the KMR team, the version is only updated some times. (Maybe Rey's repo has an updated version)
Some progress...
Updated to latest pascalscript, down to just 9 warnings and 4 errors:
[dcc32 Warning] W1030 Invalid compiler directive: 'true'
[dcc32 Hint] OverbyteIcsWinsockImpl.inc(279): H2077 Value assigned to 'GetProc' never used
[dcc32 Hint] OverbyteIcsWinsockImpl.inc(311): H2077 Value assigned to 'GetProc2' never used
[dcc32 Hint] OverbyteIcsWinsockImpl.inc(339): H2077 Value assigned to 'GetProc3' never used
[dcc32 Warning] OverbyteIcsWndControl.pas(124): W1054 You are compiling ICS with an unknown and untested compiler version!
[dcc32 Hint] OverbyteIcsWSocket.pas(13439): H2077 Value assigned to 'NewSessionCallback' never used
[dcc32 Hint] OverbyteIcsWSocket.pas(13494): H2077 Value assigned to 'GetSessionCallback' never used
[dcc32 Hint] OverbyteIcsWSocket.pas(15135): H2077 Value assigned to 'Entry' never used
[dcc32 Warning] KM_Scripting.pas(218): W1058 Implicit string cast with potential data loss from 'string' to 'AnsiString'
[dcc32 Error] KM_Scripting.pas(649): E2009 Incompatible types: 'regular procedure and method pointer'
[dcc32 Error] KM_Scripting.pas(650): E2009 Incompatible types: 'regular procedure and method pointer'
[dcc32 Error] KM_Scripting.pas(651): E2009 Incompatible types: 'regular procedure and method pointer'
[dcc32 Warning] KM_Scripting.pas(664): W1057 Implicit string cast from 'AnsiString' to 'string'
[dcc32 Warning] KM_Scripting.pas(664): W1057 Implicit string cast from 'AnsiString' to 'string'
[dcc32 Warning] KM_Scripting.pas(668): W1057 Implicit string cast from 'AnsiString' to 'string'
[dcc32 Warning] KM_Scripting.pas(668): W1057 Implicit string cast from 'AnsiString' to 'string'
[dcc32 Warning] KM_Scripting.pas(672): W1057 Implicit string cast from 'AnsiString' to 'string'
[dcc32 Warning] KM_Scripting.pas(672): W1057 Implicit string cast from 'AnsiString' to 'string'
[dcc32 Fatal Error] KM_Game.pas(52): F2063 Could not compile used unit 'KM_Scripting.pas'
I'll take a closer look, maybe tomorrow. Maybe something else from Rey's fork will help here.
You might want to check the changes in the updated PascalScript and revert back a couple of lines we have manually changed in there for the Remake (e.g. I recall we changed the event from "procedure" to "procedure of object", or something alike - which gives the E2009 error you are having) There was also something to do with strings handling, iirc.
Looking into it now...
PascalScript has been moved a couple of times in the repo but here is the history for reference:
followed by...
https://github.com/Kromster80/kam_remake/commits/master/src/common/pascalscript/Source