Sign in to follow this  

problems setting up opengl using microsoft visual studio

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

This topic is 4711 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this