PDA

View Full Version : errors...



Vincent_dup1
06-28-2004, 12:18 PM
Hey, I'm relatively new to OpenGL, and I got this error, after following a tutorial from Nehe, saying, well two actually, but it says:

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

Debug/trial.exe : fatal error LNK1120: 1 unresolved externals (thats probably pointing to the upper error... lol)

Can someone help me fix this?

jabe
06-28-2004, 12:29 PM
this problem has nothing to do with opengl itself. i would guess you are compiling under windows and you did copy and paste some windows application code into a console application project. instead of the main function a winmain function is needed for windows application. this one could not be found => linking error.

if you are using visual studio, change linker/system/subsystem settings in the project property page to "Windows". if nothing helps, try to get some project files from nehe.

Vincent_dup1
06-28-2004, 02:04 PM
I made it a win32 app... but now i get this error

fatal error C1010: unexpected end of file while looking for precompiled header directive

jabe
06-28-2004, 02:09 PM
disable precompiled headers in the project settings or add the line
#include "stdafx.h"
which has the needed defines and stuff. personally i dont like precompiled headers.

you can enter the error number into .net's help prompt and read what causes the problem and how to solve it.
enter: "C1010"

jan

Vincent_dup1
06-28-2004, 02:36 PM
works now, thanks a lot