Sign in to follow this  

Errors, library problem?

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

Howdy yall, I get the following errors when trying to compile my program with textures. ------------------------------------------------------------- Linking... gltexture.obj : error LNK2001: unresolved external symbol __imp__glPopMatrix@0 gltexture.obj : error LNK2001: unresolved external symbol __imp__glEnd@0 gltexture.obj : error LNK2001: unresolved external symbol __imp__glVertex2d@16 gltexture.obj : error LNK2001: unresolved external symbol __imp__glTexCoord2d@16 gltexture.obj : error LNK2001: unresolved external symbol __imp__glBegin@4 gltexture.obj : error LNK2001: unresolved external symbol __imp__glRotatef@16 gltexture.obj : error LNK2001: unresolved external symbol __imp__glPushMatrix@0 gltexture.obj : error LNK2001: unresolved external symbol __imp__glBindTexture@8 gltexture.obj : error LNK2001: unresolved external symbol __imp__glEnable@4 gltexture.obj : error LNK2001: unresolved external symbol __imp__glClear@4 gltexture.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16 gltexture.obj : error LNK2001: unresolved external symbol _gluBuild2DMipmaps@28 gltexture.obj : error LNK2001: unresolved external symbol __imp__glTexParameterf@12 gltexture.obj : error LNK2001: unresolved external symbol __imp__glTexEnvf@12 gltexture.obj : error LNK2001: unresolved external symbol __imp__glGenTextures@8 gltexture.obj : error LNK2001: unresolved external symbol __imp__glDeleteTextures@8 gltexture.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8 gltexture.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4 gltexture.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4 LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/gltexture.exe : fatal error LNK1120: 20 unresolved externals Error executing link.exe. -------------------------------------------------------------- I think i might need to include a specific library when using textures, but i'm not sure which one. If anyone recognizes these errors I would greatly appreciate some help. This was compiled with VC++.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The headers are obviously already included as the errors are of an external nature. Just add the opengl32 lib to the project workspace and you'll be fine.

Share this post


Link to post
Share on other sites
Thanks for the help yall, now i get only two errors. It may be because its a console app instead of a win32 app like Enigma said, however, i'm new to this and have no idea how to switch between the two?

my errors are...

Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/gltexture.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Share this post


Link to post
Share on other sites
The usual suspects:
  1. Do you have texturing enabled?

  2. Is your texture power-of-2 sized?

  3. Do you create your texture after obtaining a valid OpenGL context?

  4. Do you use mipmapped filtering? Do you create a texture with mipmaps?


Enigma

Share this post


Link to post
Share on other sites
Well, I downloaded this example to examine its source, and now i'm trying to recreate it. The texture came with the source. The only problem is that the workspace settings arent set, and i dont know what i need to set to make it work. The coordinates should be fine, the image rotates around the origin. It's just the image is all white and no texture lol.

I'll post some source, or send it to anyone if it would help, but i think the source isnt the problem.

Share this post


Link to post
Share on other sites
Ok, it's solved...Apparently the .raw texture has to be in the debug folder for it to work. I had it in my project folder, but it didn't read it there. Is there a reason it needs to be in debug besides the fact that it only works in there?

EDIT - nevermind i'm mixing up my project folders and workspace folders. I still havent grasped that concept.

Anyways, thanks for your help yall, i appreciate it. This board is very handy.

Share this post


Link to post
Share on other sites

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