If not, It might help to add a link parameter (-k...) into the fpc command line. How about:
/usr/local/bin/ppcppc MyKillerApplication.pas -k-lsdl -oMyKillerApplication
This should result in an ld command in ppas.sh where the -lsdl statement is the very first parameter:
/usr/bin/ld -lsdl -L. -o MyKillerApplication `cat link.res`
system.o and allthelocalunits.o files come very late in link.res.
I am not able to check this, but it seems to me that the linker should pick the main entry point from the sdllib in this case. I think it shouldn´t be to hard for the users of fpc to add appropriate -k... parameters to the fpc command line.
Best regards
Rolf
Am 03.09.2004 um 13:12 schrieb Jonas Maebe:
On 3 sep 2004, at 11:16, Florian Klaempfl wrote:
Can't you add the SDLMain to the darwin sdl units and let this call main? Or is main defined twice
then because the sdllib contains a main?
Yes. And for some reason, the linker picks the main of our system unit to execute instead of the one in libsdl. I don't know on what basis it does this. The reason it doesn't trigger a duplicate symbol error is that the Mac OS X linker works with a two-level name space: all libraries have their own symbol namespace (although you can disable this for legacy *nix compatibility using an environment variable).
Jonas
_______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal