Hey,
"undefined reference" error is emitted by the linker, not the compiler. I guess you missed to specify the opengl/glut library for linking, e.g.
# gcc <usual_options> -lopengl
or whatever the name of the library is. The -l Option implies the library name to begin with lib*. In the case the OpenGL does not start with lib*, you could use the following syntax:
# gcc <usual_options> -l:<library_name>
For the case, the solutions above don't help either, you should check that the linker really knows where to search for the libraries (-L option). Maybe, you need to use something from pkg-config ...
Hope that helps,
- Andi -
|