View Full Version : Help with link error _WinMain@16

09-12-2000, 08:59 PM

I've been trying to run some sample programs. It compiles correctlyt but I'm having trouble with building. I am receiving the error

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

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

Anyone has any idea where this is coming from?

I'm also coding an new program and I've only started with the basic initializations of the window and I'm also encounterting this error.


09-12-2000, 10:32 PM

Okay, First of all, what compiler are you using?

Secondly...can you post your entry code for the Win32 program? I mean the function where the program begins..

It might help out a bit!

09-12-2000, 10:56 PM
Yoy are probably compiling towards the wrong target platform.

The compiler expects a WinMain() function because you have created a Win32 application project. But you probably have a main() as entry point. Either change the project to a Win32 application, and not a consol application. Or rewrite the main() function to a WinMain().