Jump to content
  • Advertisement
Sign in to follow this  
cicakMasin

can someone fix this for me

This topic is 4612 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

hi.. i've already type my first program using opengl but i've found a lot of error. i've look through my code and found nothing wrong.. here i paste the error that appear in my screen. -------------- Configuration: tutorial2 - Win32 Debug----------- Linking... 123.obj : error LNK2001: unresolved external symbol _gluPerspective@32 123.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0 123.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4 123.obj : error LNK2001: unresolved external symbol __imp__glViewport@16 123.obj : error LNK2001: unresolved external symbol __imp__glHint@8 123.obj : error LNK2001: unresolved external symbol __imp__glDepthFunc@4 123.obj : error LNK2001: unresolved external symbol __imp__glEnable@4 123.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8 123.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16 123.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4 123.obj : error LNK2001: unresolved external symbol __imp__glEnd@0 123.obj : error LNK2001: unresolved external symbol __imp__glVertex3f@12 123.obj : error LNK2001: unresolved external symbol __imp__glBegin@4 123.obj : error LNK2001: unresolved external symbol __imp__glTranslatef@12 123.obj : error LNK2001: unresolved external symbol __imp__glClear@4 123.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4 123.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8 123.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4 Debug/tutorial2.exe : fatal error LNK1120: 18 unresolved externals Error executing link.exe. tutorial2.exe - 19 error(s), 0 warning(s) ------------- how's that happen. can someone fix that to me. i tot it must b a compiler error. i really need ur help. thanks again in advance.

Share this post


Link to post
Share on other sites
Advertisement
Add opengl32.lib and glu32.lib to your linker input files.

In visual studio 2003 you go to project > properties > Linker > Input and select additional dependencies.

Share this post


Link to post
Share on other sites
I don't do any Open GL programming but you're just forgetting to link in a library. Those are linker errors where it can't find the appropriate symbol. Check to make sure you're linking in all the right libs.

Share this post


Link to post
Share on other sites
I prefer to use #pragma comment rather than using MSVC++'s linker to fix dependancies, but it's just a personal preference.

Place this in your header:

#pragma comment(lib, "Opengl32.lib")
#pragma comment(lib, "glu32.lib")


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!