Jump to content
  • Advertisement
Sign in to follow this  
Alibaro

OpenGL Error with auxDIBImageLoad.

This topic is 4856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!