Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   auxDIBImageLoad (http://www.go4expert.com/forums/auxdibimageload-t232/)

Levi 7Jan2005 00:08

auxDIBImageLoad
 
I figured this out a while ago. Thanks.
Levi

Quote:

ok, so I'm trying to write a screensaver in MVS C++ 6.0. I'm just starting, and I'm trying to learn how to work with opengl. I'm trying to apply texure to a cube, and whenever I try to batch build the program it comes back with:
Creating library Release/Screensaver.lib and object Release/Screensaver.exp
Screensaver.obj : error LNK2001: unresolved external symbol _auxDIBImageLoadA@4
Release/Screensaver.scr : fatal error LNK1120: 1 unresolved externals

However, when I just buld it in MVS it does'nt have any errors. Also, when i try to compile it not it screensaver format, it is fine. What is happening here. Thanks for any help. Here is the section of the code that is causing the error, with the exact line in bold.
Code: CPP

UX_RGBImageRec *LoadBMP(char *Filename) // Loads A Bitmap Image
{
    FILE *File=NULL;    // File Handle

    if (!Filename)  // Make Sure A Filename Was Given
    {
        return NULL;    // If Not Return NULL
    }

    File=fopen(Filename,"r");   // Check To See If The File Exists

    if (File)   // Does The File Exist?
    {
        fclose(File);   // Close The Handle
        [B]return auxDIBImageLoad(Filename);[/B]   
            // Load The Bitmap And Return A Pointer
    }

    return NULL;    // If Load Failed Return NULL
}



Aiursrage2k 2Nov2005 11:37

Re: auxDIBImageLoad
 
Just started OpenGL today, and ran into the same problem (following the nehe tuts?)... I found this forum while looking for the solution...

Anyway the solution might be to link: Glaux.lib

Levi 2Nov2005 19:20

Re: auxDIBImageLoad
 
Wow, that's not bad for your first day. Yes, I believe that is what was wrong. : ) This thing has been up here a looong time, and you're the first to answer me. I was forced to figure it out myself. : ) Good luck. Oh, yes you were right, I was doing the NeHe tutorials. If you haven't already, you should go to the www.gamedev.net forums, they have lots of good stuff, and you usually always get answers.
Levi

gage 27Apr2007 07:11

Re: auxDIBImageLoad
 
thanks. linking glaux.lib worked for me also.

DaWei 27Apr2007 07:39

Re: auxDIBImageLoad
 
Actually, there was a good reason no one responded:
Quote:

I figured this out a while ago. Thanks.
Don't know about anyone else, but I didn't read beyond the obvious statement.

offsitenoc 6Dec2010 14:48

Re: auxDIBImageLoad
 
Wow it is great information for me It is my first post also

sleree 8Jan2011 21:43

Re: auxDIBImageLoad
 
It is the valuable information


All times are GMT +5.5. The time now is 09:56.