Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LNK2001 Error 1

Status
Not open for further replies.

justinr

Programmer
Feb 3, 2001
4
US
There is the link to my source code

Here are the errors...

--------------------Configuration: EX2_06 - Win32 Debug--------------------
Compiling...
Ex2_06.cpp
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/EX2_06.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

EX2_06.exe - 2 error(s), 0 warning(s)

Any help? I'm just starting and have no idea. This has nothing to do with me I don't think.
 
The linker generate the error:

Error LNK2001: '_WinMain@16': Unresolved External Symbol

CAUSE
MFC UNICODE applications use wWinMainCRTStartup as the entry point.

RESOLUTION
In the Output category of the Link tab in the Project Settings dialog box, set the Entry Point Symbol to wWinMainCRTStartup.

Marius Samoila
Brainbench MVP for Visual C++
 
I've already tried that. Thanks though.
 
I'd recommend going back and re-creating the project that contains your source file. If, as you've indicated, you're new to this, you may have mistakenly selected "Win32 Application" instead of "Win32 Console Application" when you created your project.

Win32 Applications expect a function called WinMain instead of main, whereas Win32 Console apps require a main function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top