Getting undefined reference to

I am new to opengl programming. I am trying to complie opengl program, but I am getting undefined reference to `mouseMotion’ errors even though complied with -lglut on the command line.

gcc -lglut prg.c

Please suggest me how should i compile without errors.


Try this:
gcc -L/usr/X11R6/lib -lGL -lGLU -lglut prg.c

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