PDA

View Full Version : linking error



09-26-2002, 06:00 PM
what does the following mean:

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

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

it has problm linking ... but my file is save under .cpp in VS6

chicho
09-26-2002, 09:08 PM
You have created a Win32 Application, not a Win32 CONSOLE aplication. In a win32 application the entry point is "Winmain", not "main" like a Win32 console application.

Leyder Dylan
09-28-2002, 11:44 AM
The more simple :

Alt+F7

Choose "Link" tab, replace the line :

/subsystem:console

by

/subsystem:windows

tinak
09-28-2002, 04:54 PM
Or you could add this line to the top of your code..

#pragma comment( linker, "/entry:\"mainCRTStartup\"" )

I've been using this for glut apps where I didn't want the extra console window to pop up.

Tina