WinMain@16 (Was: retired FAQ entries)
David Starks-Browning
starksb@ebi.ac.uk
Tue Dec 12 07:57:00 GMT 2000
On Tuesday 12 Dec 00, David Starks-Browning writes:
> The following were in the FAQ as "Known/potential Problems in the
> Latest Net Release":
>
> Linking with -lm or -lc leads to crash
Perhaps I spoke to soon. Although linking with -lm no longer crashes,
one does have to be careful about where to put it:
bash$ gcc hello.c -lm
bash$ ./a.exe
Hello World!
bash$ gcc -lm hello.c
/c/TEMP/ccjLEGlU.o(.text+0x10):hello.c: multiple definition of `main'
/usr/lib/libm.a(libcmain.o)(.text+0x0):libcmain.c: first defined here
/usr/lib/libm.a(libcmain.o)(.text+0x6a):libcmain.c: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
This is not in the FAQ anywhere. I'll add it to the existing section
about WinMain@16.
Thanks to Patrick Doyle for bringing this to my attention.
David
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list