https://bugs.winehq.org/show_bug.cgi?id=55289
Bug ID: 55289 Summary: undefined reference to `wWinMain' Product: Wine Version: 8.11 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winecrt0 Assignee: wine-bugs@winehq.org Reporter: esteve.varela@gmail.com Distribution: ---
I can't get wineg++ -mconsole -municode to correctly attempt to call wmain instead of wWinMain:
$ echo '#include <stddef.h>\nint wmain(int argc,wchar_t *argv[]){return 0;}' > test.c $ wineg++ -mconsole -municode test.c /usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/wine-staging-8.11/bin/../wine/x86_64-unix/libwinecrt0.a(exe_wmain.o): in function `wmain': (.text+0x9b): undefined reference to `wWinMain' collect2: error: ld returned 1 exit status winegcc: /usr/bin/x86_64-pc-linux-gnu-g++ failed
This issue is reproducible on both Debian 12 and Gentoo, using winehq-8.11.