PDA

View Full Version : Eager for your help to load a BMP



jiangerlai
03-13-2003, 02:42 AM
In my program there is a function to load a BMP as follow:


AUX_RGBImageRec LoadBMP(LPCTSTR Filename)
{
FILE *File = NULL;
if ( !Filename ) {
return NULL;
};

File = fopen( Filename,"r" );

if ( File ) {
fclose( File );
return auxDIBImageLoad( Filename );
};

return NULL;

}


The compiling message:


Compiling...
EarthSatsCtl.cpp
Linking...
Creating library Debug/EarthSats.lib and object Debug/EarthSats.exp
EarthSatsCtl.obj : error LNK2001: unresolved external symbol _auxDIBImageLoadA@4
Debug/EarthSats.ocx : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

EarthSats.ocx - 2 error(s), 0 warning(s)

I don't know how to correct ,erger for your help.

snupinokyo
03-13-2003, 03:42 AM
Originally posted by jiangerlai:
In my program there is a function to load a BMP as follow:


AUX_RGBImageRec LoadBMP(LPCTSTR Filename)
{
FILE *File = NULL;
if ( !Filename ) {
return NULL;
};

File = fopen( Filename,"r" );

if ( File ) {
fclose( File );
return auxDIBImageLoad( Filename );
};

return NULL;

}


The compiling message:


Compiling...
EarthSatsCtl.cpp
Linking...
Creating library Debug/EarthSats.lib and object Debug/EarthSats.exp
EarthSatsCtl.obj : error LNK2001: unresolved external symbol _auxDIBImageLoadA@4
Debug/EarthSats.ocx : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

EarthSats.ocx - 2 error(s), 0 warning(s)

I don't know how to correct ,erger for your help.


check if you #include <gl/glaux> & <stdio.h>

jiangerlai
03-13-2003, 03:54 AM
I am programming in Visual c++ 6.0

#include "stdafx.h"
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glaux.h>
#include <gl/glut.h>

jiangerlai
03-13-2003, 04:08 AM
I guess it is due to the file GLAUX.LIB or glaux.h. Does anyone agree with me and help me

chowe6685
03-13-2003, 05:02 AM
you need to link to the glaux.lib library
#pragma comment (lib, "glaux.lib")
should do the job, but you should find a better solution then glaux, it is a buggy library that is no longer supported