Unresolved external symbol in Visual c++!?? HELP!!

piski

Senior member
Jan 21, 2002
312
0
0
I keep getting these messages:

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

this happens on the most simple code:

#include <iostream>

using namespace std;

int main()
{
cout << "hello";

return 0;
}

what am i doing wrong? this just started happening!
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,005
126
It sounds like you've built a Win32 project and that's why it's looking for WinMain instead of Main. If you want to make a generic application then make a console project instead.