|
From: Patrick M. <ox...@st...> - 2002-05-18 17:19:02
|
On Sat, May 18, 2002 at 07:15:11PM +0200, KJK::Hyperion wrote: > At 07.00 15/05/2002, you wrote: > >On Wed, May 15, 2002 at 01:33:11AM +0200, KJK::Hyperion wrote: > >> ... that I forgot to ask: > >> - is there some --do-exactly-what-i-say-and-not-what-you-think-i-need > >> switch? because no matter how many -no this and -fno that I put in the > >> command line, if a program happens to have a procedure called main, a > gcc -I../../../include -nostdinc -fno-builtin -I./ -I../../../../../include > -pipe -march=i386 -c crthybrid.c -o crthybrid.o > gcc -I../../../include -nostdinc -fno-builtin -I./ -I../../../../../include > -pipe -march=i386 -c testfork.c -o testfork.o > gcc -nostartfiles -nostdlib -Wl,--subsystem,console \ > -Wl,--entry,___PdxLdrEntry@4 \ > -o testfork.nostrip.exe \ > crthybrid.o testfork.o ../../../../../dk/w32/lib/ntdll.a > ../../../../../dk/w32/lib/kernel32.a ../../../lib/psxdll/psxdll.a > testfork.o(.text+0x43):testfork.c: undefined reference to `__main' > make: *** [testfork.nostrip.exe] Error 1 well, you need your custom __main function then. usually it is in libgcc.a or crt0.o (dunno for sure and it depends on the version of gcc) and it sets up some stack and calls main(). and it seems like it uses atexit on mingw32 patrick mauritz -- ,------------------------------------------------------------------------. > In the Beginning there was nothing, which exploded - Yeah right... < |------------------------------------------------------------------------| > Moonlight 3D Resurrected | www.moonlight3d.net < `------------------------------------------------------------------------' do what thou whilst shall be the whole of the law love is the law, love under will there is no law beyond do what thou whilst |