NeHe Legacy tutorial lesson 6

Started by
5 comments, last by robobrain 12 years, 4 months ago
Good day everyone.
Well, I'm quite new to OpenGL, so I'm going through those Legacy tutorials found in nehe.gamedev.net website.
But in Lesson 6, there is a problem with function:

AUX_RGBImageRec *LoadBMP(char* Filename)
{
FILE* File = NULL;
if(!Filename)
{
return NULL;
}
File = fopen(Filename, "r");
if(File)
{
fclose(File);
return auxDIBImageLoad(Filename);
}
return NULL;
}



My compiler doesn't find auxDIBImageLoad(Filename); function.
Everything is going smoothly except this one. How could I fix it?

Error message:
undefined reference to `auxDIBImageLoadA@4'|
Advertisement
Looks like linker error, do you specify required library?
I added opengl library, glu library, glux library.
They are linked to CodeBlocks
And now, in the same Lesson 6, there is problem with initializing textures.
Even if I download the original code and compile it, it starts, asks for fullscreen and then message box pops up with - Initialization failed.
You need to add the glaux.lib library, which is deprecated and doesn't ship with Windows anymore. You will have to write your own bitmap loading function or just use a new library, like SDL or SFML.
Want to make Android Games?
Then check out the free RoboBrain SDK.
[size="2"][url="http://www.robobrain.org"]www.robobrain.org[/url]

You need to add the glaux.lib library, which is deprecated and doesn't ship with Windows anymore. You will have to write your own bitmap loading function or just use a new library, like SDL or SFML.


But how can I create my own image loader? I'm just starting, wanted to follow tutorials, but they are not working!
Maybe you have some script to share with for texture mapping?

[quote name='robobrain' timestamp='1324049023' post='4894504']
You need to add the glaux.lib library, which is deprecated and doesn't ship with Windows anymore. You will have to write your own bitmap loading function or just use a new library, like SDL or SFML.


But how can I create my own image loader? I'm just starting, wanted to follow tutorials, but they are not working!
Maybe you have some script to share with for texture mapping?
[/quote]

You're in luck, NEHE updated the tutorial so it doesn't use glaux.h anymore. Check this out:

http://nehe.gamedev.net/tutorial/lesson_06_texturing_update/47002/
Want to make Android Games?
Then check out the free RoboBrain SDK.
[size="2"][url="http://www.robobrain.org"]www.robobrain.org[/url]

This topic is closed to new replies.

Advertisement