More glut linking errors


I’m trying to build a program on Ubuntu Linux that uses the Glut library, but I am getting linker errors:

g++ -o smview -rdynamic -L/home/ben/jot/lib/linux/D -L/usr/X11R6/lib -fPIC -g -Wall -DGL_GLEXT_PROTOTYPES smview.o -L/usr/lib -Wl,-rpath /usr/lib -lGLU -lGL -lpthread -lglut -lX11 -lXext -ldl -lm -lbase_jotapp -lglut_winsys -lglui -lwidgets -lmanip -lgest -lgeom -ldisp -lgtex -lmesh -lnet -ldev -lstd -lmlib -ldlhandler -llibpng -lzlib -lglew -lbase_jotapp -lglut_winsys -lglui -lwidgets -lmanip -lgest -lgeom -ldisp -lgtex -lmesh -lnet -ldev -lstd -lmlib -ldlhandler -llibpng -lzlib -lglew
/home/ben/jot/lib/linux/D/libglut_winsys.a(glut_winsys.o)(.text+0x12e1): In function GLUT_WINSYS::set_focus()': /home/ben/jot/glut_winsys/glut_winsys.C:443: undefined reference to __glutCurrentWindow’
/home/ben/jot/lib/linux/D/libglut_winsys.a(glut_winsys.o)(.text+0x12ff):/home/ben/jot/glut_winsys/glut_winsys.C:444: undefined reference to __glutCurrentWindow' /home/ben/jot/lib/linux/D/libglut_winsys.a(glut_winsys.o)(.text+0x130e):/home/ben/jot/glut_winsys/glut_winsys.C:444: undefined reference to __glutDisplay’
collect2: ld returned 1 exit status

I have already had to add “-lpthread” to resolve other undefined references. I tried adding other libraries, but cannot get it to build. Does anyone have any ideas?


quite simple. there is no glutCurrentWindow function,
neither a glutDisplay. check the glut doc here

maybe you thought of glutDisplayFunc and

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.