This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
WinMain@16 (Was: retired FAQ entries)
- To: cygwin at cygwin dot com
- Subject: WinMain@16 (Was: retired FAQ entries)
- From: David Starks-Browning <starksb at ebi dot ac dot uk>
- Date: Tue, 12 Dec 2000 15:57:38 +0000
- References: <2593-Tue12Dec2000132202+0000-starksb@ebi.ac.uk>
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