
Problem with NeHe tutorials, err sort of...
I trying to take lesson on of NeHe''s tutorials and use it as the framework for my own OpenGL projects.
I created a new Win32 app and created a blank C++ file to work in and the i cut and pasted the code from the first NeHe tutorial to create a blank window. When i tried to compile it and create just the blank window to make sure everything was going to work i got all sorts of link error(15 in all).
Any ideas as to why the code will not work, i mean i only copied and pasted. It wouldnt have been any different if i has just typed all that in.
I can open the .dsw file from that same tutorial and it will compile everything just fine.
Below are all the errors that it is giving me. I think this will be some silly newbie error i am making but it has me baffled right now
Thanks anyone who can help me out.
[These are the errors i recieve after i create a new win32 project and copy and paste the code onto my own .cpp file and try to compile it]
--------------------Configuration: framework - Win32 Debug--------------------
Compiling...
framework.cpp
Linking...
framework.obj : error LNK2001: unresolved external symbol _gluPerspective@32
framework.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
framework.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
framework.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
framework.obj : error LNK2001: unresolved external symbol __imp__glHint@8
framework.obj : error LNK2001: unresolved external symbol __imp__glDepthFunc@4
framework.obj : error LNK2001: unresolved external symbol __imp__glEnable@4
framework.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8
framework.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
framework.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4
framework.obj : error LNK2001: unresolved external symbol __imp__glClear@4
framework.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4
framework.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8
framework.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/framework.exe : fatal error LNK1120: 15 unresolved externals
Error executing link.exe.
framework.exe - 16 error(s), 0 warning(s)

You got to link the OpenGL libraries to your IDE. The easiest way would be to add this to your main.cpp file:
#pragma comment(lib, "OPENGL32.LIB")
#pragma comment(lib, "GLAUX.LIB")
#pragma comment(lib, "GLU32.LIB")
#pragma comment(lib, "DINPUT.LIB")
#pragma comment(lib, "OPENGL32.LIB")
#pragma comment(lib, "GLAUX.LIB")
#pragma comment(lib, "GLU32.LIB")
#pragma comment(lib, "DINPUT.LIB")
You''re not a programmer until that moment you stop yourself from destroying your computer into a billion- million pieces
instead of copypasting, how about reading the tutorial? its written there what you have to do..
"take a look around" - limp bizkit
www.google.com
"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
ugh thanks Dave...
Did i just get insulted by someone with a Limp Bizkit quote in there sig?
[edited by - Springer on October 3, 2002 1:15:08 PM]
Did i just get insulted by someone with a Limp Bizkit quote in there sig?
[edited by - Springer on October 3, 2002 1:15:08 PM]
Most common mistake, you need to build a WIN32 app, not a console app, not a win16 app.
actually what happened was this...
I am so used to jsut opening the .dsw files that come with tuts that i forgot that i have to link my own lib files when i make my own project.
Second after i got that figured out i was accidentally creating a Win32 console app. All that C++ has got the console window ingraved into my brain.
I am so used to jsut opening the .dsw files that come with tuts that i forgot that i have to link my own lib files when i make my own project.
Second after i got that figured out i was accidentally creating a Win32 console app. All that C++ has got the console window ingraved into my brain.

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement