Sign in to follow this  
Alibaro

OpenGL Error with auxDIBImageLoad.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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" )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this