Jump to content
  • Advertisement
Sign in to follow this  
com_gom

problems setting up opengl using microsoft visual studio

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

Iam using visual studio for my work in opengl but Iam having some problems setting it up.Iam getting linking errors during run time.The code is compiling but on running it gives linking errors.I have inserted opengl32.lib glu32.lib glut32.lib and the corresponding dlls but iam still getting errors. these are the lind of errors I am getting... Linking... as.obj : error LNK2001: unresolved external symbol _glFlush as.obj : error LNK2001: unresolved external symbol _glEnd

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by virtuacasper
i think i know what your problem is...

you have to include windows.h before gl/gl.h etc...

i hope this solves your problem...


I do not thnik that is the problem because he would be getting compiler errors since OpenGL is dependent on windows.h.

Quote:

have inserted opengl32.lib glu32.lib glut32.lib and the corresponding dlls but iam still getting errors.


Do you mean inserted into the project or added them in via project settings? Try adding

#pragma comment(lib,"opengl32.lib")
#pragma comment(lib,"glu32.lib")
#pragma comment(lib,"glut32.lib")


to your header file and see if that works.

Share this post


Link to post
Share on other sites
I tried what you guys said but it is still giving the same errors..I was wondering if I have to include some other libs like gl.lib and glu.lib except
for the 3 lib files I have already added.

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.

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

Sign me up!