PDA

View Full Version : Linking Problem



Jmolar
02-06-2004, 04:39 AM
My code compiles fine. At linking time, I get this errors:

Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16

Debug/Tree.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

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

I am using microsoft Visual C++. Can any one help me please.

dvm
02-06-2004, 05:08 AM
You're probably using a Windows Application instead of a Windows "Console" Application or vice versa. A windows app needs a WinMain, while a console app needs a main. I think it's better to create a new project for a console app and copy everything over the main cpp file. If you get into any more trouble provide a little more information as to if your using glut or something else.

Jmolar
02-11-2004, 03:52 AM
Thanks a lot for your help. The Linking problem is gone now. Another problem I have is that:
When I execute (or run) my program, it works fine and I can see the drawing. But when I run the "exe" file located in the "Debug" folder, it will only show the drawing window without the drawing.

Vlasko
02-11-2004, 07:15 AM
If your program depends on some other files(textures models ...) you'll need to copy exe file into project directory

Jmolar
02-12-2004, 02:20 AM
Thanks a lot. The program uses an input.dat file to get the coordinates. I put the input.dat file in same folder with .exe file and it is working fine now. Thanks for your help guys.