Advertisement

unresolved external : WinMain@16

Started by July 19, 2002 03:19 PM
4 comments, last by misterX 22 years, 3 months ago
hi, well, i''ve this (i suppose common) problem: when i make a standart Win32 (not console) application, it gives me this error when linking: error LNK2001: unresolved external symbol _WinMain@16 (VC++ 5.0) what''s wrong ?
Did u #include?
"...and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces."----------Scott Meyers, "Effective C++"
Advertisement
you didn''t write WinMain, so the linker can''t find it.

---
Come to #directxdev IRC channel on AfterNET
sorry but i'm not used to c++... what should I include exactly ? And what do you precisely mean by writing WinMain ?


[edited by - misterX on July 19, 2002 4:42:47 PM]
You need to declare the function WinMain, since this is the starting point of all Win32 applications.

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPredInstance, LPSTR lpCmdLine, int nShowCmd){    // Do stuff...this is basically your "main" function from console programming} 
thanks

This topic is closed to new replies.

Advertisement