I’m using Borland (freeCommandlinetools) with windows 98. When compiling NeHe’s lesson6.cpp, I recieve the following error while linking:
Error: Unresolved xternal ‘auxDIBImageLoadA’ referenced from C:\WINDOWS\DESKTOP\GL\GL.OBJ
Earlier tutorials (colors and rotations) compile fine, it just chokes when I use auxDIBImageLoad() to get a bmp texture.
Is my compiler broke, do I need to upgrade opengl somehow? Yes, <glaux.h> is included… the code should be fine. (Don’t know if it matters, but the included exe ran fine, it just won’t recompile on my system.)
the problem is, you are not linking to glaux.lib. However, finding the glaux library for borland can be quite difficult. However, glaux is a badly broken library and you really should replace it with something else like DevIL
I changed compilers (now using mingw). I compile lesson 6 like so:
g++ lesson6.cpp -mwindows -lopengl32 -lglu32 -lglaux
and it compiles correctly now. When ran, it tells me that it couldnt load ‘glaux.dll’. OK, where can I get glaux.dll? Shouldn’t that have come with my video drivers?
You can compile with Borland using the command “implib” from glaux32.dll.
implib glaux32.lib glaux32.dll
glaux is a static library, which means it doesn’t have a DLL. At least it is for VC++. I think I remember hearing something about someone having a DLL version for use with other compilers, though.
On 05-26-2002 02:45 PM, an unregistered user known as Dustin made the following remark:
Is my compiler broke, do I need to upgrade opengl somehow? Yes, <glaux.h> is included… the code should be fine.
First off, no your compiler is not broken. I use Borland C++ 5.02 myself, and I’ve seen this error. For some reason, Borland don’t distribute their compiler with the latest versions of the OpenGL header files/libs.
Second off, don’t even use glaux, because it’s now obsolete. A while back, they replaced it with glut, and that’s what you should be using. Come to think of it, I think glaux was platform specific, but anyways…
The following link has the latest versions of glut32.h, glut32.lib, glut32.dll, as well as the latest gl.h for Borland, which includes the prototypes for glGenTextures() and glBindTexture(). (For some reason, Borland compilers don’t come with these prototypes)
On 05-26-2002 06:32 PM, a frequent contributor known as chowe6685 made the following remark:
…you really should replace it with something else like DevIL
I agree. You really should consider using this to load your images. It’s easy to use, and the width and height of your bmp file are not restricted to being of a power of two. Check it out here:
Oh well…hope this helps.
While on the subject of considering new utils.
you Might want to have a look at www.libsdl.org.
The Simple DirectMedia Layer.