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.
https://bugs.winehq.org/show_bug.cgi?id=55289
--- Comment #1 from esteve.varela@gmail.com --- I should mention that doing this same thing with x86_64-w64-mingw32-g++ does work, so this is a behavioral mismatch of winegcc.
https://bugs.winehq.org/show_bug.cgi?id=55289
--- Comment #2 from Eric Pouech eric.pouech@gmail.com --- use
echo -e '#include <stddef.h>\nextern "C" int wmain(int argc,wchar_t *argv[]){return 0;}' > test.c
agreed that it shouldn't be necessary need to look where it comes from
https://bugs.winehq.org/show_bug.cgi?id=55289
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
https://bugs.winehq.org/show_bug.cgi?id=55289
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |dark.shadow4@web.de
--- Comment #3 from Fabian Maurer dark.shadow4@web.de --- Still present in wine-9.0-rc5.