Error with auxDIBImageLoad.
Hi to everybody, I'm trying to run an OpenGL program but every time I try to run the following error coming:
error LNK2001: unresolved external symbol _auxDIBImageLoadA@4.
Thanks for any help.
AUX_RGBImageRec *LoadBMP(char *Filename)
{
FILE *File=NULL; // file handle
if (!Filename) return NULL; // make sure there is a file name
File=fopen(Filename,"r"); // attempt to read the file
if (File) // if file exists, close and return the handle
{
fclose(File);
return auxDIBImageLoad(Filename); //* section of the code is causing error
}
return NULL; // load failed
} // END OF LoadBMP
--------------
Yes,
I've added all the Headers and Libraries but still not working.
#pragma comment( lib, "opengl32.lib" )
#pragma comment( lib, "glu32.lib" )
#define WIN32_LEAN_AND_MEAN
#include <windows.h> // include all the windows headers
#include <windowsx.h> // include useful macros
#include <mmsystem.h> // for mci commands or PlaySound
#include <stdlib.h> // for rand functions
#include <stdio.h>
#include <math.h>
#include <gl\gl.h> // OpenGL32 library
#include <gl\glu.h> // GLU32 library
#include <gl\glaux.h> // GLAUX library
#include <glaux.h>
[Edited by - Alibaro on August 2, 2005 6:52:34 PM]
The compiler doesn't know what auxDIBImageLoad is. Are you including the proper header or lib?
Yes, I've written all the headers, but may some are missed ?
#include <windows.h> // include all the windows headers
#include <windowsx.h> // include useful macros
#include <mmsystem.h> // for mci commands or PlaySound
#include <stdlib.h> // for rand functions
#include <stdio.h>
#include <math.h>
#include <gl\gl.h> // OpenGL32 library
#include <gl\glu.h> // GLU32 library
#include <gl\glaux.h> // GLAUX library
#include <windows.h> // include all the windows headers
#include <windowsx.h> // include useful macros
#include <mmsystem.h> // for mci commands or PlaySound
#include <stdlib.h> // for rand functions
#include <stdio.h>
#include <math.h>
#include <gl\gl.h> // OpenGL32 library
#include <gl\glu.h> // GLU32 library
#include <gl\glaux.h> // GLAUX library
I've spent more than a week for searching and finally I've got nothing.
So, please if anyone know how to solve this problem or know any useful sites.Tell me soon. Thanks for any help.
Quote:Original post by Alibaro
I've spent more than a week for searching and finally I've got nothing.
So, please if anyone know how to solve this problem or know any useful sites.Tell me soon. Thanks for any help.
You've already been answered correctly. Link to glaux.lib.
Alibaro, as stro sais, you need to link glaux.lib so it knows where to find the binary that matches your glaux.h include.
Add the following code below your other library links:
#pragma comment( lib, "glaux.lib" )
Add the following code below your other library links:
#pragma comment( lib, "glaux.lib" )
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement