opengl cant run

Did you download the GLUT library’s for RedHat?

Check at RedHat.com or your install CD to see if the rpm’s for it are there. Note there are two rpm files needed to write a GLUT program, one is the runtime library and the second is the developer libraries.

Note currently Redhat has issues with the GLUT library licenses, so they may no longer offer it on there site. If you can not find it, drop me an e-mail and I will see if I have a copies handy for RH9.
I just changes from RH9 to (RH)Fedora, so I also have to re-install the glut libraries for it.

Originally posted by glstudent:
Ok! I am able to run opengl in Windows…so far. but I still can manage to figure out running it in Linux (Red Hat 9). I’ve got all the Libraries, checked the upper/lower case, e’th seems ok. But don know why it gives all the same errors.

Originally posted by EraZer:
I said THE END but I forgot. WHy I have to tell anybody what libraries he should add? Doesn’t he know what he have got in wonderful linux system? THE END2

LOL! I love seeing idiots try and defend themselves. The same thing applies to Windows. You have to know what libraries to add to the linker too. You telling someone that they need to use -lglut32 for linking glut in Linux, is like me telling you to add sockets32.lib to your linker settings when you try and use Winsock code. (In case you don’t understand the correlation, there is no sockets32.lib, or at least if there is, it’s not where the Winsock library code is located…)

I don’t really care if you like Linux or not, but you better be preparted to take some heat for ****ting all over it, since a number of other people here do use it. Just be content with letting others use Linux, while you use your bug-ridden OS… Oh, and don’t forget to download all the latest security patches. Wouldn’t want anyone taking advantage of any of the many known security holes on you, now would we…

Originally posted by glstudent:
Ok! I am able to run opengl in Windows…so far. but I still can manage to figure out running it in Linux (Red Hat 9). I’ve got all the Libraries, checked the upper/lower case, e’th seems ok. But don know why it gives all the same errors.

Are you still getting those exact same errors, or when you use the -lglut -lGL -lGLU do you get different ones? (Like maybe missing glX functions instead of glut functions?) If they are different, try posting the exact errors that you get now.

[This message has been edited by Latrans (edited 03-17-2004).]

hi all,

still trying to get things working on fedora core 1

I’ve installed Mesa-6.0

when I look in the folder Mesa-6.0/lib its empty???

I get all kinds of errors when trying to compile

could someone give me a link for a linux setup for compiling opengl

thanks

I think that the information in the readme files of the mesa library are enough. I’m no guru in linux (hell, I was excited that I managed to install mozilla and mesa!) but following the instruction of the mesa readme files I managed to compile the library. I haven’t had much experience with red hat though. My only try there for using opengl was with the gl, glu libraries only, not glut. But since you get compile errors of the mesa library that’s why you don’t get any libraries produced. If you want try posting some of the errors. Maybe someone can help. After you succesfuly compiled mesa I think it’s only a matter of putting the header files in the correct directory (for most I think it is /usr/include/GL) and then create some symbolic links to the libraries. Again I stress out that I had no idea of this information but read it in the readme files of mesa.

I just download fedora myself and yet to try install GLUT, but did you read my last post on the subject of RH and GLUT license.

You may need to look at freeglut, as a replacement for the standard glut library.

As for openGL on fedora, I have had no problem running openGL programs written with the SDL API on it.

Once I get the GLUT up and running will post how to set it up in fedora.

Here is a link for glut RPM’s for fedora, you need both runtime and develop: http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/1/glut/

Note I have not tested these out yet.

Also when in installed fedora, did you do it as a workstation (second installation option) or Personal (I think that is what the first option is called). Anyway you may have not got all the developer library’s unless you installed it as a workstation.

Also if you did not install kdevelope you may wish to go to the RPM manager and install it. It is a nice GUI compiler frontend, which has a GUI is similar the DEV-C++ interface.

Originally posted by not_yet:
[b]hi all,

still trying to get things working on fedora core 1

I’ve installed Mesa-6.0

when I look in the folder Mesa-6.0/lib its empty???

I get all kinds of errors when trying to compile

could someone give me a link for a linux setup for compiling opengl

thanks[/b]

[This message has been edited by nexusone (edited 03-18-2004).]

[This message has been edited by nexusone (edited 03-18-2004).]

Originally posted by Latrans:
[b] LOL! I love seeing idiots try and defend themselves. The same thing applies to Windows. You have to know what libraries to add to the linker too. You telling someone that they need to use -lglut32 for linking glut in Linux, is like me telling you to add sockets32.lib to your linker settings when you try and use Winsock code. (In case you don’t understand the correlation, there is no sockets32.lib, or at least if there is, it’s not where the Winsock library code is located…)

I don’t really care if you like Linux or not, but you better be preparted to take some heat for ****ting all over it, since a number of other people here do use it. Just be content with letting others use Linux, while you use your bug-ridden OS… Oh, and don’t forget to download all the latest security patches. Wouldn’t want anyone taking advantage of any of the many known security holes on you, now would we…[/b]

My last word: I don’t know what libraries are in Linux for glut. I know what libaries i’ve got in Windows. That parameter would be good for glut. And i wrote maybe -lglut32 (other tips were better? add gl and glu libraries? he needs glut- am i wrong? or maybe in linux names are diffrent).

And at the end: Number of hacked linux systems is higher than windows systems (by percent). I am not talking about UNIX- Linux only.

The linux openGL(mesa) library’s and the openGL X video drivers(DRI) are already installed on Fedora, there should be no need to re-install mesa or video drivers.

Also the library files should be in the “lib” folder. I think it is usr\lib, will have to check on it.

Originally posted by not_yet:
[b]hi all,

still trying to get things working on fedora core 1

I’ve installed Mesa-6.0

when I look in the folder Mesa-6.0/lib its empty???

I get all kinds of errors when trying to compile

could someone give me a link for a linux setup for compiling opengl

thanks[/b]

hello all,

thanks nexusone for the advice

have installed glut

when i try and compile mesa i get
http://www3.telus.net/blender/error1.jpg
http://www3.telus.net/blender/error2.jpg

i did install the “personal” edition of fedora, maybe i’ll have to go back and install the “workstation”

in usr/lib I have

libGL.so.1
libGLU.so.1
libglut.so
libglut.so.3
ligglut.so.3.7

cheers

not_yet

The errors look like maybe your tring to compiler it as a C program when maybe you need to use the C++ compiler. Note you can compile C programs with the C++, but not the other way around.

Unless you are trying to do it for a learning experiance, mesa is already install on fadora and there is no need to recompile the mesa library.

The glut library link I posted still has a bug and will not let you compile a glut program. I tried it the other night, and got a error compiling a glut based program.

There are two ways to fix this, one download an older glut RPM like build 8 (glut3.7-8) or download the source RPM’s for build 12 and rebuild both the glut-devel and glut libraries on your machine.

I’m not sure how much help this will be, but when I was getting glut working with Slackware, I needed to recompile glut after making a minor change to the source. (One of the #defines if I remember right.) I only had to do this after I installed the nVidia drivers, though…

I don’t remember what it was exactly I changed, but it was something I found in one of the posts on the Linux forum here at OpenGL.org, so a search should turn it up… I also seem to need to add a bunch of other libraries now when I try to use glut.

Oh well… I’ve started looking at how to use OpenGL in some of the native Xlib stuff, and with an Xt widget, so I probably won’t actually even use glut for any future projects.

Hello all! The following are the errors i got from Linux:

$ make F=Window
g++ -c -o Window.o Window.cpp
gcc -Wall -I/usr/X11R6/include/ -o Window -L/usr/X11R6/lib Window.o
Window.o(.text+0x18): In function myInit()': : undefined reference toglClearColor’
Window.o(.text+0x29): In function myInit()': : undefined reference toglColor3f’
Window.o(.text+0x39): In function myInit()': : undefined reference toglMatrixMode’
Window.o(.text+0x41): In function myInit()': : undefined reference toglLoadIdentity’
Window.o(.text+0x5c): In function myInit()': : undefined reference togluOrtho2D’
Window.o(.text+0x7b): In function myDisplay()': : undefined reference toglClear’
Window.o(.text+0x83): In function myDisplay()': : undefined reference toglFlush’
Window.o(.text+0xa5): In function main': : undefined reference toglutInit’
Window.o(.text+0xb2): In function main': : undefined reference toglutInitDisplayMode’
Window.o(.text+0xc7): In function main': : undefined reference toglutInitWindowSize’
Window.o(.text+0xd9): In function main': : undefined reference toglutInitWindowPosition’
Window.o(.text+0xe9): In function main': : undefined reference toglutCreateWindow’
Window.o(.text+0xf9): In function main': : undefined reference toglutDisplayFunc’
Window.o(.text+0x109): In function main': : undefined reference toglutMouseFunc’
Window.o(.text+0x116): In function main': : undefined reference toglutMainLoop’
Window.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0’
collect2: ld returned 1 exit status
make: *** [Window] Error 1
$

Btw, please do not argue about which OS is better than the other. In my opinion, both has its pros and cons. So, let’s just focus on the topic! Thanx!

looks like you need to pass opengl to your linker:

g++ -o [prog name] -lGL

hope that helps.

-=[ regards ]=-

Originally posted by ce110ut:
[b]looks like you need to pass opengl to your linker:

g++ -o [prog name] -lGL

hope that helps.

-=[ regards ]=-[/b]

I believe this has been stated numerous times in this thread already… yet glstudent seems to constantly ignore that advice…

Hello all! The following are the errors i got from Linux:
$ make F=Window
g++ -c -o Window.o Window.cpp
gcc -Wall -I/usr/X11R6/include/ -o Window -L/usr/X11R6/lib Window.o

Since you are using a Makefile, you will likely need to add the libraries in there.

Once again, at a minimum you need to add -lGL -lGLU -lglut!

Also, seems strange to use g++ to create the .o file and then use gcc for the final link… Oh well…

From all the guides that I have, I still cannot make the compiler run opengl. In the Makefile I have included allthe libraries. Please check to see if it is ok:

INCLUDE = -I/usr/X11R6/include/
LIBDIR = -L/usr/X11R6/lib

F = simplemui
COMPILERFLAGS = -Wall

CC=gcc
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
LIBRARIES = -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm

All: $(F)

$(F): $(F).o
$(CC) $(CFLAGS) -o $@ $(LIBDIR) $< $(LIBRARIES)

clean:
rm -f *.o

So what errors are you getting now?

Please post the entire output from make, and confirm that you haven’t changed anything from the makefile posted above.

Also, try altering your makefile to use gcc for both compilation and linking.

It appears that you do not have he directory to the OpenGL libraries or header files set. The make is not finding them because it has no path.

I dont mean to be rude or offending but I recommend that glstudent learns how a compiler/linkers works, what it does and what it needs, otherwise he wont understand what he is doing wrong and will stumple over this problem over and over again.

Sorry, as I said no offense intended but you have to know a tool in order to use it properly.

Originally posted by Honk:
[b]I dont mean to be rude or offending but I recommend that glstudent learns how a compiler/linkers works, what it does and what it needs, otherwise he wont understand what he is doing wrong and will stumple over this problem over and over again.

Sorry, as I said no offense intended but you have to know a tool in order to use it properly.[/b]
Yes, I agree with u. Besides, I m new to Linux. Can u point me to several links?

Well the gcc documentation and man pages (enter ‘man gcc’ in a shell, without the quotation marks of course)should be good enough to get you started.