PDA

View Full Version : Help with link error _WinMain@16



KC
09-12-2000, 08:59 PM
Hi!

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.

Thanks
Cheers!

drakaza
09-12-2000, 10:32 PM
Hello!

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!

Bob
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().