PDA

View Full Version : freeglut installation



jyoti
07-05-2009, 11:48 PM
Hi
Now I am trying to install freeglut on my linux m/c as glut installation didnt work.
I am getting the following error:

In function 'fgJoystickDetect':
error: the address of 'fgJoystick' will always evaluate as 'true'

How to solve this issue?

ZbuffeR
07-06-2009, 01:03 AM
1) linux distribution ? version ?
2) freeglut version ?

jyoti
07-06-2009, 01:16 AM
hI

I am using
FREEGLUT version - 2.4.0
linux - fedora9
kernel linux 2.6.25 - 14.fc9.i686
Gnome 2.22.1

ZbuffeR
07-06-2009, 01:48 AM
You should stay with the packages provided by your distribution.
The binary freeglut libs should already be installed, but not the dev package.

Do something like that :

sudo yum install freeglut-devel

This will install freeglut binary package (if you don't have it already) + its development headers, with correct version and dependencies for your system.

jyoti
07-06-2009, 02:39 AM
Hi
thanx for ur reply.I think there is an issue as the opengl application I am trying to run is also not executing on my system.the apis like glClear,glFlush for which glut is not reqiured are also not running though I have gl.h and glu.h in gl folder in /usr/include.Also when I use glxinfo command it is giving msg that
direct rendering = yes
Opengl version string = 1.4

Still opengl sample code giving errors of undefined reference.
What to do now?

ZbuffeR
07-06-2009, 03:20 AM
Sanity check : does glxgears works ?
- If not, then you have something seriously messed up on your system, you would be better to ask for help on a fedora forum.

- If yes, then your link settings are wrong for your code.
What do you have currently ?

jyoti
07-06-2009, 05:14 AM
Hi

glxgears is working and displaying some gears.Does it mean that glx is properly installed ? But while compilation I am getting undefined reference to some glx functions.glut functions are getting compiled meaning glut is installed properly.
this is the only error left while compiling opengl examples for glx functions.
What to do if glx is installed properly.

Dark Photon
07-06-2009, 05:51 AM
glxgears is working and displaying some gears.Does it mean that glx is properly installed ? But while compilation I am getting undefined reference to some glx functions.glut functions are getting compiled meaning glut is installed properly.
this is the only error left while compiling opengl examples for glx functions.
What to do if glx is installed properly.
The GLX functions your glut is not able to find (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=260147):


../../lib/glut/libglut.so: undefined reference to `glXQueryChannelRectSGIX'
../../lib/glut/libglut.so: undefined reference to `glXBindChannelToWindowSGIX'
../../lib/glut/libglut.so: undefined reference to `glXQueryChannelDeltasSGIX'
../../lib/glut/libglut.so: undefined reference to `glXChannelRectSGIX'
../../lib/glut/libglut.so: undefined reference to `glXChannelRectSyncSGIX'
are defined in the latest NVidia OpenGL drivers:


> nm -Do /usr/lib/libGL.so | egrep 'glXQueryChannelRectSGIX|glXBindChannelToWindowSGI X|glXQueryChannelDeltasSGIX|glXChannelRectSGIX|glX ChannelRectSyncSGIX'
/usr/lib/libGL.so:00046510 T glXBindChannelToWindowSGIX
/usr/lib/libGL.so:00046520 T glXChannelRectSGIX
/usr/lib/libGL.so:00046550 T glXChannelRectSyncSGIX
/usr/lib/libGL.so:00046540 T glXQueryChannelDeltasSGIX
/usr/lib/libGL.so:00046530 T glXQueryChannelRectSGIX
Try the same command and see what you get.

I find it interesting that here on SuSE 11.1, freeglut references "none" of the missing GLX symbols that your glut does. This suggests that using freeglut will solve your problem.

It may be that: 1) your OpenGL libs are not installed properly, OR 2) you just need to add -lGL to your link line, or 3) you just need to flip to freeglut.

Brolingstanz
07-06-2009, 07:26 AM
FYI I get no errors on F10 with glut or freeglut..

jyoti
07-06-2009, 11:26 PM
Hi
finally freeglut is working on my system.I removed the joystick code which was giving errors.
Thanx a lot ppl for all ur support.

I am still trying to install glut as it is somewhat important to use glut than freeglut.
Is there any major difference between the two?
Are the glx newly added functons only there in nvidia latest drivers not in intel drivers?

ZbuffeR
07-07-2009, 12:40 AM
RTFM:
http://freeglut.sourceforge.net/index.php
"The project is now virtually a 100% replacement for the original GLUT with only a few departures (such as the abandonment of SGI-specific features such as the Dials&Buttons box and Dynamic Video Resolution) and a shrinking set of bugs."