[fpc-devel] Test: compiling packages

Sven Barth pascaldragon at googlemail.com
Mon Sep 20 09:59:55 CEST 2010


Am 19.09.2010 22:34, schrieb Willibald Krenn:
>
> Hi Sven!
>
> Am 19.09.2010 13:49, schrieb Sven Barth:
>> and the following for Windows:
>>
>> pp -Twin32 -Fuunits/i386-win32 rtl.ppk
>
> I tried this with my 64 bit-head version of fpc, but it failed to
> produce any output except an .a and an .o file.
>
> fpc -Twin64 -Fuunits\x86_64-win64 rtl.ppk
> unknown: 12
> unknown: 12
> rtl.ppk(7) Error: PPU is already in a library :
> C:\source\fpcwilli\units\x86_64-win64\rtl\system.ppu
> rtl.ppk(7) Error: Multiple defined symbol _DLLMainCRTStartup
> rtl.ppk(7) Error: Undefined symbol: PASCALMAIN
> rtl.ppk(7) Fatal: There were 3 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: C:\source\fpcwilli\bin\x86_64-win64\ppcx64.exe returned an error
> exitcode (normal if you did not specify a source file to be compiled)
>
> So I guess there's more work to be done on the win64 target: I will look
> into this once I have a debug build of trunk (see my other mail) on my
> disk.
>

Try the following:

- create a new test directory (I'll call it "c:\test" now)
- copy the following directories from FPC's source to "c:\test" (you can 
put them directly into that directory with a "rtl" dir):
	- rtl\inc
	- rtl\x86_64
	- rtl\win
	- rtl\win64
- create the directory "c:\test\units\x86_64-win64"
- open cmd and go to "c:\test"
- execute the following command:
	fpc -Us -Sg -Fiinc -Fix86_64 -Fiwin -Fiwin64 -FUunits\x86_64-win64 
win64\system.pp

Now you should have a system.ppu and a system.o in 
"c:\test\units\x86_64-win64". Now you create the rtl.ppk in "c:\test" 
and run the compiler using the following command:
	fpc -Fuunits\x86_64-win64 rtl.ppk

Note: You need to recompile the system.pp once you've tried to compile 
the rtl.ppk or you'll get the error you mentioned.

If you have problems regarding this procedure, please don't hesitate to 
ask (but I might not be able to answer till Thursday, cause I'm on a 
developer conference).

Regards,
Sven



More information about the fpc-devel mailing list