I have pretty much the exact same problem as you at the moment.
Im trying to compile some OpenSG tutorial examples with the makefile that comes with it, which also tries to include ‘-lglut’ and doesnt find it. And i also have /usr/lib/libglut.so.3.
If you come up with the solution please post it here.
Ok, i used the whole path /usr/lib/libglut.so.3 instead of just -lglut and it works… but if i have /usr/lib in my LD_LIBRARY_PATH it should work either way shouldnt it?
Originally posted by Dingo Egret:
[b]Ok, i used the whole path /usr/lib/libglut.so.3 instead of just -lglut and it works… but if i have /usr/lib in my LD_LIBRARY_PATH it should work either way shouldnt it?
[/b]
Thanks…now it can compile. However, the below error come up:
gcc -I/usr/X11R6/include/ -o myWindow -L/usr/X11R6/lib -L/usr/lib/libglut.so.3
myWindow.o -lGL -lGLU -lX11 -lXmu -lXi -lXext -lm
myWindow.o: In function main': myWindow.o(.text+0xa5): undefined reference toglutInit’
myWindow.o(.text+0xb2): undefined reference to glutInitDisplayMode' myWindow.o(.text+0xc7): undefined reference toglutInitWindowSize’
myWindow.o(.text+0xd9): undefined reference to glutInitWindowPosition' myWindow.o(.text+0xe9): undefined reference toglutCreateWindow’
myWindow.o(.text+0xf9): undefined reference to glutDisplayFunc' myWindow.o(.text+0x109): undefined reference toglutMouseFunc’
myWindow.o(.text+0x116): undefined reference to `glutMainLoop’
collect2: ld returned 1 exit status
make: *** [myWindow] Error 1
Any idea how to solve this undefined reference to ‘***’?