Fez_Master
Fez_Master

Reputation: 1

If MinGW-w64 doesn't support wWinMain, then what C++ compiler should I use instead?

I've been attempting to follow this guide here for writing a program in C++ that allows me to create an application window, however I ran into an issue where whenever I used Run Build Task with MinGW-w64 on the example code provided on the page linked above, I keep running into this same error.

c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to 'WinMain@16'

collect2.exe: error: ld returned 1 exit status

The important part of that bit is the undefined reference to 'WinMain@16' at the end. Apparently because the sample code I tried uses wWinMain instead of WinMain, MinGW can't find any entry point? So this would mean I can't use MinGW if I want to run this code. So what do I do instead? What compiler would actually work for compiling wWinMain?

Upvotes: 0

Views: 298

Answers (0)

Related Questions