Skip to main content
gamedev.net
🔒 Locked

Errors, library problem?

Started by Steers Dec 13, 2004 at 4:57 PM 10 replies 2.2k views
Original Post
Steers
Steers
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++.
baddogj
baddogj
you need to include either ,,. If you included those then you need to go into settings,link and add OpenGL32.lib GLu32.lib and GLaux.lib
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/
Enigma
Enigma
You need to link OpenGL32.lib and glu32.lib (glaux.lib not needed). You also need to compile as a Windows application, not a console application.

Enigma
Steers
Steers
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.
baddogj
baddogj
you should start a new window app. copy the code from the old file, paste it on the new file, delete the old file, and save the new file and your good.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/
Steers
Steers
Woohoo, compiled 0 errors and 0 warnings, thanks yall. Only one problem now...The texture shows up as white instead of a texture...i don't think its the code, but i'll go back and check.
doctorsixstring
doctorsixstring
Do you have lighting set up properly? What about your texture coordinates?
Enigma
Enigma
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
Steers
Steers
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.
Steers
Steers
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.
_nomad_
_nomad_
i got some tutorials also at: http://developer.nomadph.com which you might find useful. :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.