[fpc-devel] passing -shared to ld(win32)

Andrew Haines AndrewD207 at aol.com
Thu Aug 30 23:49:50 CEST 2007


Hi, I've been trying to make the xbox a target for fpc and have run into
a problem. I need to pass --shared to ld.

I tried with some c code to see if --dll  was enough but it didn't work

Essentially I've copied the t_win.pas and i_win.pas files and modified
them for the xbox.

andrew at amd64 ~/programming/xbox/bin $
~/programming/fpc/compiler/ppcross386 -Txbox ./simpletest.pas -k-shared
-Fl/usr/local/openxdk/
-Fu/home/andrew/programming/fpc/rtl/units/i386-xbox -XPi386-pc-xbox-
-Aas -Xe
Warning: resourcecompiler is already registered!
Free Pascal Compiler version 2.3.1 [2007/08/30] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: xbox for i386
Compiling ./simpletest.pas
Assembling simpletest
Linking simpletest.exe
Cannot export
CLASSES_ACTIVATECLASSGROUP$TPERSISTENTCLASS$$TPERSISTENTCLASS: symbol
not found
Cannot export CLASSES_ADDTHREAD$TTHREAD: symbol not found
Cannot export CLASSES_BEGINGLOBALLOADING: symbol not found
Cannot export CLASSES_BINTOHEX$PCHAR$PCHAR$LONGINT: symbol not found
Cannot export CLASSES_BITSERROR$ANSISTRING: symbol not found
Cannot export CLASSES_BITSERRORFMT$ANSISTRING$array_of_const: symbol not
found


lot's more of this ending with:

Cannot export fpc_write_text_shortstr: symbol not found
Cannot export fpc_write_text_sint: symbol not found
Cannot export fpc_write_text_uint: symbol not found
Cannot export fpc_write_text_variant: symbol not found
Cannot export fpc_write_text_widechar: symbol not found
Cannot export fpc_write_text_widestr: symbol not found
Cannot export fpc_writeln_end: symbol not found
Cannot export operatingsystem_result: symbol not found
simpletest.pas(4,17) Error: Error while linking
simpletest.pas(4,17) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

Is there something I'm missing?

I've tried building the rtl with -bl -WB -WR fPIC and other assemblers
but still this same result.

Regards,

Andrew



More information about the fpc-devel mailing list