Thread: AUX_RGBImageRec Function error. HELP!

  1. #1
    Computer guy
    Join Date
    Sep 2005
    Location
    I'm lost!!!
    Posts
    200

    AUX_RGBImageRec Function error. HELP!

    So i have my class that will handle graphic for my game:
    Code:
    class Graphic
    {
    public:
    	GLuint *Texture;
    	int TextureAmount;
    	vector<char*> ImageName;
    
    	Graphic();
    	Graphic(int textureAmount);
    	~Graphic();
    
    	bool LoadInformation ( char* fileName );	// load the file that contains direction of the images will be load
    
    	AUX_RGBImageRec *LoadBMP(char *fileName);	// load bitmap images from external file
    
    	bool LoadTextures();
    };

    Code:
    AUX_RGBImageRec *Graphic::LoadBMP(char *fileName)
    {
    	FILE *file = NULL;			//file handle
    
    	if ( !fileName )		//make sure the file name is given
    		return NULL;		//if not, quit the function
    
    	file = fopen(fileName, "r");		//check to see if the file exist
    
    	if ( file )
    	{
    		fclose(file);		//close the handle
    		return auxDIBImageLoad(fileName);       // Load The Bitmap And Return A Pointer
    	}
    
    	return NULL;		//if fail to load, then return null
    
    }
    Then after implement the AUX_RGBImageRec() function, I got an external error and dont know how to solve it.
    Error:
    Code:
    Graphic.obj : error LNK2019: unresolved external symbol _auxDIBImageLoadA@4 referenced in function "public: struct _AUX_RGBImageRec * __thiscall Graphic::LoadBMP(char *)" (?LoadBMP@Graphic@@QAEPAU_AUX_RGBImageRec@@PAD@Z)
    Can someone point out what i did wrong. Thank you very much
    Hello, testing testing. Everthing is running perfectly...for now

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Missing library on the linker command line?

    Incorrect spelling of function name (say capitalisation) ?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Computer guy
    Join Date
    Sep 2005
    Location
    I'm lost!!!
    Posts
    200
    I checked all of these already, doesnt seem to be those issuses though.
    Hello, testing testing. Everthing is running perfectly...for now

  4. #4
    vae victus! skorman00's Avatar
    Join Date
    Nov 2003
    Posts
    594
    I think you should check again, make sure you're know which library has auxDIBImageLoad. It's a linker error, so it has to do with a missing library.

    Once, I had a linker error because my code was confused about the return value of a function. I was looking for the function that returned an int, but it was determined to use the one that returned a float. static_cast'ing the function fixed that. Worth a shot if you're certain you have all the correct libs.

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  3. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  4. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM