IDE compiles successfully, but dcc32 writes: Error: E2010 Incompatible types: 'Integer' and 'NativeInt'

StackOverflow https://stackoverflow.com/questions/8598201

Pergunta

Delphi XE2 Update 3 IDE compiles the project successfully, but dcc32.exe writes:

Embarcadero Delphi for Win32 compiler version 22.0
Copyright (c) 1983,2010 Embarcadero Technologies, Inc.
ehshelprouter.pas(137) Error: E2010 Incompatible types: 'Integer' and 'NativeInt'
ehs_reg.pas(68) Fatal: F2063 Could not compile used unit 'ehshelprouter.pas'

Why? Line 137 is:

Application.OnHelp := OnRouteHelp; // function OnRouteHelp(Command: Word; Data: NativeInt; var CallHelp: Boolean): Boolean;

Thanks for the help!

Foi útil?

Solução

Your are using an older dcc32.exe by mistake (Delphi XE perhaps?). Check your PATH-setting or provide the full path to XE2 dcc32.exe in your compilation. XE2 should display this version info:

Embarcadero Delphi for Win32 compiler version 23.0

Outras dicas

Check the line in question. If it's saying that two types that should be compatible are incompatible, then there's something more complicated than simple assignment going on. If I had to guess, something is passing a function pointer around and the API has changed. Try checking for that case...

Have you double-checked that you're not compiling for Win64 with the command line? (i.e. verify it is actually dcc32.exe that is called).
In that case NativeInt is 64bits and that would be normal to raise this error.

Also, are you trying to do a full build using the -B option like (c:\program files\embarcadero\rad studio\9.0\bin\dcc32.exe -$O- -$W+ --no-config-B-Q...) or simple compile with the -M option like (c:\program files\embarcadero\rad studio\9.0\bin\dcc32.exe -$O- -$W+ --no-config-M-Q...)?

I would also try to wipe out all the dcus to see if it helps.

And since it works from the IDE, try with capturing the command line shown in the Messages area and try that exact same line in a console.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top