Trouble compiling Super bible samples

I am having trouble compiling the Open GL Supper bible’s source code, with “Microsoft Visual C++ 2008 Express Edition”

I really need help, I having been trying for a months now and I not sure if i have even set up glut and Open GL properly.

I have tired using glut and freeglut, but both don’t work.

The only way I get to compile the code if I remove

#include "../../shared/gltools.h"

And replace it with

#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

But now I’m by Chapter 4, trying to compile “Transform” example. But no luck

When I replace the code with my code I get this error

error LNK2019: unresolved external symbol "void __cdecl m3dRotationMatrix44(float * const,float,float,float,float)" (?m3dRotationMatrix44@@YAXQAMMMMM@Z) referenced in function "void __cdecl RenderScene(void)" (?RenderScene@@YAXXZ)

I really want to go on with Learning so if anyone can help that would be great!

If you can maybe give me step-by-step on how to setup open GL and Glut on “Microsoft Visual C++ 2008 Express Edition” I would really like that a lot thank you.

You need to learn about compilers before learning something advanced like GL.

The link error says that it can’t find m3dRotationMatrix44 anywhere in your cpp files or even your .lib files.

Ok I have work it out.

Thanks for your help.

I guess I must start learning my IDE better. any suggestion of how I can do that?

Ok for all you beginners out there that just got OpenGL Supper Bible and having trouble compiling the source code. And you using, Microsoft Visual C++ 2005 and newer. (I am using Microsoft Visual C++ 2008 Express Edition)

This is what you must do:

First you must download and recompile freeGlut soucre code. You can down load it at: http://freeglut.sourceforge.net/

Download the latest stable release.

Now unzip it the file, you might need to download J-Zip, it is free.

Once you unzip it, navigate to the “VisualStudio2008” folder and “VisualStudio2008Static” folder. In both open “freeglut.sln” witch opens Microsoft Visual C++.

When in the Microsoft Visual C++, next to the debug icon, there is a drop down list, with “debug”, select it to “Release” and build the project (select build from the menu bar, and click on build …)

After you have complied (built) freeGlut, next is to put the files in the right places.

In the “VisualStudio2008” folder and “VisualStudio2008Static” folder, there will now be another folder name “Release”.

So "VisualStudio2008\Release" folder, find the file named “freeglut.dll” and copy it in your you “system32” directory. For Windows XP, it in "C:\windows\system32". Now find the “freeglut.lib” and copy it to, where all you include files are.

In the "VisualStudio2008Static\Release" folder find the file name “freeglut_static.lib”, and copy and past in over the file same file in the “shared” folder, that you got with your source code.

Just make sure you also got the headers file for freeGlut. In where all you include files are, "\GL" folder.

Ok then it will work. So the summary of what you must do is:

  • [li]Download freeGlut’s source code, and complie it with your complier [*]Once complied, put the complied files in the right places, as discussed above

Well hope it helps.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.