[fpc-pascal] fpc-2.1.4.x86_64-win64.exe: Hello World program withASM, compilation aborted ? Error: Unknown identifier "EAX" ???
Skybuck Flying
skybuck2000 at hotmail.com
Thu Jul 26 10:36:08 CEST 2007
> Yes, but the default syntax is AT&T, not Intel. I assume you are coming
> from a Delphi background, so you can probably best solve this and many
> future issues you would otherwise encounter by adding {$mode delphi} at
> the top of all of your source files (or compile with - Mdelphi).
>
>
> Jonas
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
Ah, thanks a lot:
I downloaded and installed fpc-2.0.4.i386-win32.exe and was having the same
problems:
Y:\Free Pascal\Tests\Hello World>fpc HelloWorld.pas -delphi
Free Pascal Compiler version 2.0.4 [2006/08/21] for i386
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Win32 for i386
Compiling HelloWorld.pas
HelloWorld.pas(9,10) Error: Unknown identifier "EAX"
HelloWorld.pas(9,12) Error: Unknown identifier "ECX"
HelloWorld.pas(9,12) Error: Asm: [mov ???,???] invalid combination of opcode
and
operands
HelloWorld.pas(13,2) Warning: Variable "test" does not seem to be
initialized
HelloWorld.pas(16,4) Fatal: There were 3 errors compiling module, stopping
HelloWorld.pas(16,4) Fatal: Compilation aborted
Error: C:\Tools\Compilers\Free Pascal\2.0.4 Stable for
Win32\bin\i386-Win32\ppc3
86.exe returned an error exitcode (normal if you did not specify a source
file t
o be compiled)
Then I was about to make a post about this and read your tips and now it
compiles just fine ;)
Y:\Free Pascal\Tests\Hello World>fpc HelloWorld.pas -Mdelphi
Free Pascal Compiler version 2.0.4 [2006/08/21] for i386
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Win32 for i386
Compiling HelloWorld.pas
HelloWorld.pas(13,2) Warning: Variable "test" does not seem to be
initialized
Linking HelloWorld.exe
15 Lines compiled, 0.1 sec
I also tried cross compiling with stable version 2.0.4 to Win64:
Y:\Free Pascal\Tests\Hello World>fpc HelloWorld.pas -Mdelphi -Twin64
Error: Illegal parameter: -Twin64
Y:\Free Pascal\Tests\Hello World>fpc HelloWorld.pas -Mdelphi -Tx64
Error: Illegal parameter: -Tx64
So I guess I'll have to reinstall the fpc-2.1.4.x86_64-win64.exe to compile
to win64 and test out the new assembler syntax which I hope is in there !?
;)
Fingers crossed ;)
I will install them side by side:
C:\Tools\Compilers\Free Pascal\2.0.4 Stable for Win32
C:\Tools\Compilers\Free Pascal\2.1.4 Beta for Win64
I will also add both to the user path.
Hopefully that won't give problems ;)
If it does give problems I'll remove the stable version and try the beta
only ;)
Bye,
Skybuck.
More information about the fpc-pascal
mailing list