LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-08-2004, 12:06 PM   #1
koch_fr
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Rep: Reputation: 0
libglut.so compilation error


Hi,

I am compiling some openGL code on my Red Hat Linux system (2.4.21-20.ELsmp).

The command line is as follows:

g++ -o camklt camklt.o -L/usr/lib -lglut -L/usr/X11R6/lib -lGL -lGLU -lGL -lXext -lXmu -lXi -L../lib -lcamcon -L../klt/klt -lklt

and I get the following error messages:

camklt.o(.text+0x2d4): In function `redraw()':
/home/koch/sean_urop/urop_release/camklt/camklt.cpp:53: undefined reference to `glutSwapBuffers()'
camklt.o(.text+0x39b): In function `main':
/home/koch/sean_urop/urop_release/camklt/camklt.cpp:63: undefined reference to `glutInit(int*, char**)'
camklt.o(.text+0x3a8):/home/koch/sean_urop/urop_release/camklt/camklt.cpp:64: undefined reference to `glutInitDisplayMode(unsigned int)'
camklt.o(.text+0x3b7):/home/koch/sean_urop/urop_release/camklt/camklt.cpp:66: undefined reference to `glutInitWindowPosition(int, int)'

I do have the libraries at the right place with the right permissions :
> ls -l /usr/lib | grep glut
lrwxrwxrwx 1 root root 12 Oct 8 12:16 libglut.so -> libglut.so.3
lrwxrwxrwx 1 root root 14 Oct 8 12:16 libglut.so.3 -> libglut.so.3.7
-rwxr-xr-x 1 root root 213572 Oct 8 12:16 libglut.so.3.7

My LD_LIBRARY_PATH variable is:
/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib:/usr/local/lib:/u5/city/tools/mpi/mpich-1.2.1/lib

So what's wrong in there?

Thanks in advance,

Olivier

Last edited by koch_fr; 10-08-2004 at 12:08 PM.
 
Old 10-08-2004, 03:01 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
what do you get from
objdump -t /usr/lib/libglut.so | grep glut
 
Old 10-08-2004, 03:06 PM   #3
koch_fr
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Original Poster
Rep: Reputation: 0
> objdump -t /usr/lib/libglut.so | grep glut...
/usr/lib/libglut.so: file format elf32-i386
 
Old 10-08-2004, 04:21 PM   #4
koch_fr
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Original Poster
Rep: Reputation: 0
A buddy of mine gave me this fix which works:

- include glut.h from /usr/local/include/MesaGL instead of where you were getting it before (/usr/local/fltk/fltk-1.0.7)
- change #include <GL/glut.h> to just #include <glut.h> in the source
- use -L/usr/local/lib

The conclusion is that glut.h's differ in some way.

Thank you for your help.

Olivier
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel compilation error: Error 15: File not found Niceman2005 Linux - General 9 10-04-2007 03:45 AM
Installing libglut tgreiner Linux - Newbie 1 02-21-2005 04:38 PM
can't install libglut XforcR Linux - Newbie 1 07-04-2004 03:04 AM
can't install libglut XforcR Linux - Software 1 07-03-2004 08:03 PM
Can't find libglut even though the file is there????? TheGr81 Linux - General 3 01-25-2003 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration