-
_WinMain@16
Dear All,
I have recently migrated to Code::Blocks from Dev-cpp. When I tried several of my programs to compile, I always get:
undefined reference to `_WinMain@16`
message.
I have searched through FAQs to find some hint, but no success! I have googled this message, but the MSN site was not very helpful(maybe I did not understand fully).
It is probably something simple, but it does not help me. Please help.
PS: My system is AMD 64 bit and Windows 64 bit Vista.
-
The message is a simple one. It means you did not defined a WinMain() function anywhere in your program.
I'm assuming you have a main(), in which case you need to find the project option that'll compile a console app instead of a Windows app.
-
What compiler are you using?
In gcc, it usually means that the second option of searching for main failed, so there is neither main, nor WinMain() [or WinMain is incorrectly declared].
In Visual Studio, you are probably, as Cactus_hugger indicated, trying to build a program that has a main function, but with options to use WinMain function. This is fixed by changing your project options to compile as "Console" application rather than "Windows" (or GUI) application.
--
Mats
-
Thank you guys! I think I got good leads from you....