Win10 x86-64
cygwin v3.5.4
I'm using g++ to link my object modules non-windows object module and
g++ includes a windows library. The library seems to need to have a
winMain function, which my code does not have, and generates a linker
error.
I don't know why there is an automatic need to link to libcmain. Is
there any way to remove this library (and why is it there in the first
place?).
SequenceNumber >> g++ Sequence.o
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld:
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../lib/libcygwin.a(libcmain.o):
in function `main':
/usr/src/debug/cygwin-3.5.4-1/winsup/cygwin/lib/libcmain.c:37:(.text.startup+0x79):
undefined reference to `WinMain'
collect2: error: ld returned 1 exit status
S