954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Linking error messages when building program

When trying to build me program the error message
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Marking Program.exe : fatal error LNK1120: 1 unresolved externals occurs. I am not sure why this happens, any thoughts

jonnie83
Newbie Poster
24 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

It sounds like you had originally specified a (GUI) Windows application, but provided code for a console application. The GUI app expects WinMain, the console app expects main. It may be easiest to create a new project as a Windows Console Application, and then add your existing source file(s) to it.

[IMG]http://img234.exs.cx/img234/6439/win32consoleapplication9lh.th.jpg[/IMG]

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You