Skip to main content
GameDev.net gamedev.net
🔒 Locked

OpenGL SuperBible 5th Edition - Problems

Started by Morzorr Aug 27, 2011 at 7:50 PM 5 replies 2.6k views
Original Post
Morzorr
Morzorr
Ok, I desperately need some help here. I must of followed every single guide in the world on how to set up opengl and this and that, and NOTHING is working.. Here's the trouble:

I'm trying to learn OpenGL with SuperBible 5th Ed, and it says, in order to do so you need to set up freeglut, glut.h, glew.h, blah blah, link it all, in a right order, disable some things, and what not. Its in chapter 2 when you do your first program; drawing a simple triangle.

Basically, I thought I finally done it all. I downloading GLEW, I downloaded and installed freeglut, but I keep getting an "undefined reference to" when calling functions from glut and glew. Can someone just lay ALL the files I need on a plate and give me a full on guide on how to set it up.

All I'm trying to do is draw this ****ing triangle..

EDIT: The trouble is I haven't got the right .lib files for GLTools. I have all the source code, but I am not sure how to compile these files with MINGW into .o and .a files. Can someone help me? Or can someone direct me to GLTools binaries? Cheers.
dfighter
dfighter
Sounds like you are not linking the libraries you need.
The header files only contain the interface definitions for the API, not the actual API code.
Morzorr
Morzorr

Sounds like you are not linking the libraries you need.
The header files only contain the interface definitions for the API, not the actual API code.




add the proper lib folder to your project and add the proper .lib files to your project dependencies as well.



As far as I know, I've linked all the .lib files I need. And I've gone through project options and such and linked everything that I've been told to.
Morzorr
Morzorr
I think I've found the problem, and it may turn out I'm using the wrong lib files. How do I compile say a directory of files into a .a file with C::B?
jesse007
jesse007

I think I've found the problem, and it may turn out I'm using the wrong lib files.


Generally, .lib files are for Visual Studio and .a files are for gcc. I've never used Code::Blocks but I found it easier to create the library on the command line. I did get errors with the compilation so I had to edit some of the author's source files to work with gcc. It's been a while since I compiled it so I can't remember the parameter flags to the archiver (google it ;) ) . If all you want is the GLTools Mingw library, I uploaded it to mediafire so you can get it from here:

http://www.mediafire...w336h30c6b1o6i5

MD5 : 2d222fad816c369863471a361df04ec3
SHA1 : 55e30640219451a458642ae7fb821860e96b7afa
Good judgment comes from experience; experience comes from bad judgment.
Aristotel
Aristotel
I also just started to make games and the easiest way for me to make GLUT work was to use codeblocks GLUT template. It automatically links the needed libraries if you supply him with the path to the GLUT folder ( you do this during the template setup ) which should have, I think two folders (lib and something else; the setup will tell you which).

Hope it helps

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.