how to start OpenGL in SuSE 8.2

I am using SuSE 8.2 and have installed mesaglu-devel,mesaglut-devel and mesa-devel libraries. But when I compile a simple program by gcc -o Hello_World Hello_World.cpp -lX11 -lMesaGL -lMesaGLU -lMesatk -lm, following errors are informed:

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/…/i486-suse-linux/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

Anyone can suggest some reasons and how to deal with it.

Another question is whether I have to use a text editor like gVIM to implement OpenGL or any other platform.

Thanks a lot.

Originally posted by ResearchI49a:
[QB]I am using SuSE 8.2 and have installed mesaglu-devel,mesaglut-devel and mesa-devel libraries. But when I compile a simple program by gcc -o Hello_World Hello_World.cpp -lX11 -lMesaGL -lMesaGLU -lMesatk -lm, following errors are informed:

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/…/i486-suse-linux/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status

Anyone can suggest some reasons and how to deal with it.
i’m a fedora boy, so this might be slightly different. I guess you have not specified the LIB directory for X11R6, under redhat you need to add

gcc -o Hello_World Hello_World.cpp -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lMesaGL -lMesaGLU -lMesatk -lm

Another question is whether I have to use a text editor like gVIM to implement OpenGL or any other platform.
Nah, any text editor will do…

I am trying gcc -o Hello_World Hello_World.cpp -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lMesaGL -lMesaGLU -lMesatk -lm

But some errors followed:

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/…/i486-suse-linux/bin/ld: cannot find -lMesatk
collect2: ld returned 1 exit status

Any suggestions?

Thanks a lot.

You should be able to link to libgl, there is a standard ABI now and linking directly to Mesa may give software rendering 100% of the time.

http://oss.sgi.com/projects/ogl-sample/ABI/

As for Mesatk I assume you don’t need that for Hello World, it’s probably some wrapper for tcl/tk but I really have no idea.

Mesa is not what you should be using on Linux now (although it is a core part of some implementations there), that is old advice that still persists in some places on OpenGL.org.

This is in the wrong forum, I’m moving it to the Linux forum look there please. And search the history in that forum, related questions about linking & compiling OpenGL have come up there many times.