PDA

View Full Version : Noob install question



bishboria
03-19-2008, 02:32 PM
Hi,

I recently got the openGL super bible (4th Ed.) and it's been really good so far. The only problem is that when i try to code the very first program (called simple) it won't work. I've searched for how to install the various .h, .lib files but it still doesn't seem to work.

I've also looked at the openGL wiki in the getting started section and it doesn't help either.

I'm using code::blocks with MinGW built in.

Can someone _please_ tell me how to get this working and where to put the various files? This is driving me insane!

Once i find out i'll need to write a document for other noobs like myself...

Cheers in advance,

bish

ZbuffeR
03-19-2008, 03:17 PM
Define "it won't work." with the error messages etc.

bishboria
03-19-2008, 03:36 PM
I keep getting "undefined reference to ..." where ... is glClear, glFlush, glutClearColor, etc for every gl call in the first example.

I can't be that far away I'm guessing...

And just incase this helps i have the following files in the following places:
glu32.dll, glut32.dll, glut.dll, opengl32.dll: Windows\System32
glut32.lib, glut.lib: MinGW\lib
gl.h, glu.h, glext.h: MinGW\include\gl

I am also using the "shared" folder from the superbible website, and that is placed on the same level as my c++ project.

I don't have any linker references or that sort of thing as I don't know what to put in... :)

bishboria
03-20-2008, 02:40 AM
Apologies for the bump. I'm still having trouble with this!

Any help?

Zengar
03-20-2008, 04:35 AM
You will have to link to the corresponding libraries (*lib files) or use a programming language that spares you all the linking confusion (like pascal).

bishboria
03-20-2008, 06:42 AM
I've found a semi solution: I've linked the MinGW\lib folder, and also added glut32, opengl32, glu32, winmm, and gdi32 libs to the linker.

but for this to work i've had to change the include statement from:

#include "..\shared\gltools.h"

to:

#include <windows.h>
#include <gl\glut.h>

This is obviously windows specific, but I intended to learn openGL so that it was platform independent. This is an ok solution for now, however.