auxDIBImageLoad(Filename) - error

Started by
6 comments, last by Jamazon 20 years, 9 months ago
Hi I''m trying to use texture mapping in a simple open gl program, put a bmp on each side of the cube but when I try to compile some code I got from the NeHe website (tutorial 6) my compiler (Borland 5.5) gives me an error: unresolved external ''auxDIBLoadImageA'' reference from c:\borland\bin\opengl.obj. I have got the glaux library (a new one from the borland site yesterday) . Is there another way to use bitmaps for texture mapping or am I doing something wrong? Please HELP, i''ve been trying to fix this small problem for ages!! Thanks
-------
Advertisement
In the header file, there should be a #define mapping functions foo to fooA or fooW (if I remember correctly), based on a switch dependent on the configuration of your system. Try to fiddle with it. That, or examine what functions actually are declared in your obj file (with an hex editor, the function names are in clear text somewhere in the file).

good luck
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
If you have the glaux library in the compilers lib directory should it work. You have to include glaux.lib in your command line or project.
If something is wrong with your downloaded file can you get it from the Borland ports of the NeHe lessons. It is many ways you can load images files and most of them is better than using glaux.
glaux is not updated anymore(deprecated). There used to be docs in old msdn library but not anymore. You could use PNG file format for images and libpng(www.libpng.org) to load/save them so basically you can replicate that auxDIBLoadImage() function. If you''re wondering what the A and W stand for A is for ascii(one char equals one byte) and W is for wide(one char is two bytes or similarly UNICODE). Some languages have more characters thus two bytes are used to represent them. I''m planning on moving away from bmps and use pngs. Pngs can be compressed and each pixel can contain an 8-bit alpha channel, I think.
i am also getting this error message in visualc++ when i try to load a texture. i have added glaux.h to the prioject and included it, but i am still getting an unresolved external error

GLAux.lib(tk.obj) : error LNK2001: unresolved external symbol __ftol2
Debug/opengl6.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

can anyone help? if it helps i am following tutorial 6 and the downloadable code does the same thing.
ok this worked for me so it might work for more people. i replaced the glut.lib and glut32.lib file with new ones from opengl.org

i used the 3.7beta files. i think it was a problem with the files installed by Visual c++

hope this helps.
did you go under project, settings, link tab, and then add the appropriate files before kernel32?

----------Invincible intelligence isn't evincible.
from the forum faq:
"Also, if you really want to learn about loading a a texture, go over to NeHe"s Site and check out lesson 25. But, if you can avoid it, DO NOT USE THE GLAUX LIBRARY (glaux.lib). Its incredibly outdated, and is not worth your time. And please, no more questions about glaux.dll. It does not exist !"


"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
Member of the Shove Pouya Off A Cliff club, SPOAC. (If you wish to join, add this line to your signature.)Member of "Un-Ban nes8bit" association, UNA (to join put this in your sig)"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

This topic is closed to new replies.

Advertisement