PDA

View Full Version : unable to run opengl on fedora core 3



debs
03-14-2007, 11:44 AM
hey ppl,
actually i'm doing a graphics display system using opengl.. i'm using fedora core 3 for that purpose. i installed the full cds of fedora .. but at the end when i'm compiling my code its giving linking error and saying the glut.h file is missing.. i dont understand what is happening because previously also i had used the same version of linux to compile some other codes .. those code are also not running now.. i'm really facing a lot of prob for that.. do help me out what to do.. if possible please tell me the link from where i can download the opengl plugins for fedora core 3 so that i can run my code..

thanks..

ropel
03-15-2007, 01:06 AM
You should check if you have glut available. As root try to do '$> updatedb' to update the search database. Then do '$> locate glut.h'. If that does return a path to you glut, make sure you compile your app with '-lglut' to include the link library. If you don't have glut installed, try to yum install glut, or download the source.

Good luck

RigidBody
03-15-2007, 03:05 AM
since the compiler says that glut.h is missing, it is a compilation error, not a linker error.

you have to find glut.h; if it is in /usr/X11R6/include/GL/glut.h, you have to compile with

gcc -I/usr/X11R6/include

assuming that you include

#include<GL/glut.h>

EDIT: sorry, the compiler flag has to be -I , not -L

debs
03-15-2007, 07:48 AM
thanks for the reply ppl.. actually glut.h is not missing.. but the commands under glut.h header is not compiling..

even the man pages of glutDisplayFunc() and glutReshapeFunc() are not coming.. it says the man pages are not found.. so i assumed that glut.h is not found..

RigidBody
03-15-2007, 08:06 AM
the man pages have nothing to do with the compiling process. if the header file and the library are there, it should work.

maybe you can post some code and the error messages.

debs
03-16-2007, 10:37 AM
ok thank u ppl.. now i'm getting the output.. actually i was not using the -lglut option..

debs
03-23-2007, 08:22 AM
hey ppl can u plz tell me how to print dynamec string on the screen using opengl..