Hi! I'm really desperate in getting a complete answer on this one. I'm trying to make a gui for my c application. It has to use mesa. After visiting a few websites, I realize that I need to use glut, which provides windowing functionality for mesa. Now, I have already installed all packages which I think are necessary.
These packages are found in the mandrake 9.1 distribution cds:
libMesaGL1-5.0-3mdk
libMesaGLU1-5.0-3mdk
libMesaGLU1-devel-5.0-3mdk
libMesaglut3-5.0-3mdk
libMesaglut3-devel-5.0-3mdk
Mesa-5.0-3mdk
Mesa-demos-5.0-3mdk
Here is a sample c application that uses glut:
Code:
Code:
#include <GL/glut.h>
int main( int argc, char** argv )
{
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_RGB );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 300, 300 );
int myWindow = glutCreateWindow( "hello world!" );
glutMainLoop();
return 0;
}
compiling it with "gcc simpleGlut.c" outputs the ff errors:
undefined reference to glutInit
undefined reference to glutInitDisplayMode
undefined reference to glutInitWindowPosition
undefined reference to glutInitWindowSize
undefined reference to glutCreateWindow
undefined reference to glutCreateMainLoop
compiling it with "gcc simpleGlut.c" outputs:
cannot find lglut
I viewed the GL/glut.h file in the /usr/include directory. I saw that the function prototypes were there. I think there's something wrong with the library i'm compiling with.
is it really "gcc simpleGlut.c -lglut"? Or something else?
Do I need the opengl-devel package installed? I can't find it in the linux distribution cds.
Maybe you could give me a link to a good website on this topic? I got nothing from
www.mesa3d.org.
I'm using mandrake 9.1.
Thanks for reading this long post.