error LNK2001: unresolved external symbol _auxDIBImageLoadA@4

Hi! I need your help.

I am using VC++ 6.0.

header files are:

#include “stdafx.h”
#include <GL/glaux.h>
#include <GL/glut.h>
#include <math.h>
#include <iostream.h>
#include <stdlib.h>

I am doing a texturing on a plain surface.But, whenever I run the program, there is error such as

////////////////////////////////////////////
Linking…
MasterGLUT.obj : error LNK2001: unresolved external symbol _auxDIBImageLoadA@4
Debug/MasterGLUT.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
//////////////////////////////////////////////

I tried to solve that problem. but I still can not. I need your help. Thank you in advance.

D.B.

use:

#pragma comment(lib, “Glaux.lib”)

you forgot to add the glaux library to your project.

Usually, it comes from your compiler which is not configured to use libraries. In Visual Studio 6.0, make sure (in your project settings) that you correctly added the libs into the linker.

Hope that helps

EDIT: Damn euproprio was faster than me. So you can add libs through your project settings or through euproprio’s method.

glAux is a bit old an not everyone has the lib file so i present to you this Aux replacement code found over at nehe.gamedev.net