Starting OpenGL In Linux

Started by
14 comments, last by Halsafar 18 years, 5 months ago
Do I HAVE to use MESA to program for openGL?
Advertisement
Glut is in kind of a weird place. If you are downloading Mesa, then make sure to download the source AND the demo package. Glut is in the demo package. Extract both tars into the same directory, and then ./configure && make && su -c "make install"

It's really not obvious at all, so it was a little frustrating for me until I finally found it myself.
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
Okay:

gcc lesson1.c -L/usr/local/lib -L/usr/lib -lglut
gcc -o homer lesson1.o -L/usr/local/lib -L/usr/lib -lglut

'homer' booted just fine. Given lesson1, all it did was show up a blank screen, escape closing it.

SO, my FINAL question:

Why the heck did adding ONLY glut and removing the openGL libraries FIX THIS!!!

All the other methods posted in here produced nothing but missing reference or missing library '/usr/bin/ld the linker was freakin out'

Edit: AND NOW MY COMPILER OF CHOICE, Intel 'icc' won't work.
IPO Error: unresolved : glClearColor() for example.
HAHAHA I THINK I SOLVED IT!!!

All the OpenGL libraries where located in
/usr/X11R6/lib/

So I copied the libG*.so (which ended up being about 8 openGL named files) to:
/usr/lib

Now I can link the libraries properly like you guys have been informing me at least.
use -L/usr/X11r6/lib/ before any -lglut or -lGL flags. Most of my openGL examples contain linux makefiles, you might find some of them kinda useful link
Hey thanks, nice site.
I'll be sure to include it in my learning curve :)

This topic is closed to new replies.

Advertisement