0

i am programming in Microsoft Visual c++ 6.0 and I have two linking
errors that I do not know what they mean. Can someone please help.

Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Programming Project 1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

3
Contributors
4
Replies
5
Views
12 Years
Discussion Span
Last Post by CrazyDieter
0

It means you're using the wrong project type. You created a Win32 application (which requires WinMain instead of main) and then treated it as if it were a console application (by using main instead of WinMain).

0

just replace your int main(void) function with :

int WINAPI WinMain(

    HINSTANCE hInstance,	
    HINSTANCE hPrevInstance,	
    LPSTR lpCmdLine,	
    int nCmdShow 	
   )
0

just replace your int main(void) function with :

int WINAPI WinMain(

    HINSTANCE hInstance,	
    HINSTANCE hPrevInstance,	
    LPSTR lpCmdLine,	
    int nCmdShow 	
   )

Brilliant! Destroy portability because you're too lazy to delete the project and try again. Since it's not obvious whether the OP wants portable C++ or Win32 C++, a better suggestion would be to create a new project that doesn't expect platform specific code to compile.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.