Getting undefined reference to

Hello,
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.

Thanks…

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.