Closed Danjb1 closed 5 years ago
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
Found the key: https://github.com/Kromster80/kam_remake/commit/2e7c400df27f86fd0d44bafa3c6ed4b405b9de71
And this commit seems to relate to the string warnings I'm seeing: https://github.com/Kromster80/kam_remake/commit/5cc861cb57f5d956d66958d9733b722eeea947c3
Strangely, that line is already present in my version of the file, and the warnings persist nonetheless.
But hey, it compiles! π π
Thanks for your help.
In Delphi 10.3 Community Edition, trying to compile the RXXPacker project:
Am I missing something here?