help with loading bitmaps

hi there
im having troubles loading bitmaps
i’ve got the code from nehe and it does a bit like this:

#include <GL/glaux.h>

AUX_RGBImageRec *Image = NULL;
Image=auxDIBImageLoad(“somebitmapfile”);

where in place of somebitmapfile i put a path of a bitmap e.g c:\windows\Circles.bmp
but i keep getting the error :
undefined reference to `auxDIBImageLoadA@4’

can someone help me out?
thanks

That is a linker error is it not?

Also, don’t use aux… Nehe has a better .bmp reader in one of the tutorials.

Did you put in your linker, to include the glaux.lib?

The glaux.lib is only used for BMP file loading. Later in nehe tutors, you will find he stop’s using the glaux libray.
And starts useing a TGA file loader for his textures, since the glaux library is no longer supported.
TGA has advantages over BMP files, one is that it is easier to load the files and it supports a alpha channel(which is very useful).

Originally posted by jono_123:
[b]hi there
im having troubles loading bitmaps
i’ve got the code from nehe and it does a bit like this:

#include <GL/glaux.h>

AUX_RGBImageRec *Image = NULL;
Image=auxDIBImageLoad(“somebitmapfile”);

where in place of somebitmapfile i put a path of a bitmap e.g c:\windows\Circles.bmp
but i keep getting the error :
undefined reference to `auxDIBImageLoadA@4’

can someone help me out?
thanks[/b]

so how do i load a bitmap without glaux?

There are other routines you can use to do this, other people have writen code to load BMP’s. (See the nehe site, tutor 33 has a TGA loader and I think there is also BMP loader)
And as I suggested you can use the TGA format, any good paint program can convert BMP to TGA.

Originally posted by jono_123:
so how do i load a bitmap without glaux?

windows has it’s own native code for loading .BMPs. if you have visual studio, the documentation outlines all you need to know.

b

See examples 1-4 on how to load load bitmaps without glaux.
http://www.mfcogl.com/bitmaps.%20MFC%20&%20OpenGL.htm