Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Springer

Problem with NeHe tutorials, err sort of...

This topic is 5741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)

Share this post


Link to post
Share on other sites
Advertisement
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")

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Most common mistake, you need to build a WIN32 app, not a console app, not a win16 app.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!