PDA

View Full Version : Setting up OpenGL environment!!



Kirbastan
11-15-2012, 11:22 AM
Hi everyone!
This is my first post.

I'm making a simple game application using C++ and openGL for my uni.
I'm trying to get a proper working environment at home and problems come up as i do this.
Some of them i have managed to sort out but others appear on the way...

Now I am at a stage where I have installed eclipse, a compiler and downloaded glew and glut libraries. I believe i have linked them to eclipse as well but not 100% sure.

Well, I need someone who is relevant to guide me or tell me exactly what i need from scratch to start developing using OpenGL.

"Hello World" compiles and runs so im on the right path.

The other thing is that when i include glut and glew in my code, it used to underline them as it did not recognise them but now that's sorted as well. The underlining is gone (im guessing i did the linking right) but it won't compile because of this one error.

-----------------------------------------------------------------------------------------------
13:01:28 **** Incremental Build of configuration Debug for project second project ****
make all
Building target: second project
Invoking: Cross G++ Linker
g++ -o "second project" ./src/second\ project.o -l/usr/include/GL
/bin/ld: cannot find -l/usr/include/GL
collect2: error: ld returned 1 exit status
make: *** [second project] Error 1

13:01:29 Build Finished (took 434ms)
------------------------------------------------------------------------------------------------

Please I need help with this as I can't get on with the project and I'm slowly falling behind.
If I made this post in the wrong section, someone let me know asap!

Cheers!

Rosario Leonardi
11-15-2012, 05:14 PM
Di you already read this page? http://www.opengl.org/wiki/Getting_Started
I guess you are working under Linux.
This code compile? http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_%28GLX%29

Then, you are trying to link the header? Your library should be in something like /usr/lib/GL, you don't even need to specify the whole path, if your environment is configured correctly you only need to specify -lGL

BTW don't use glut, but freeGlut, glut is no more maintained.