Cannot compile GtkGLArea examples by my own



Hi.
I want to use GtkGLArea widget to write an opengl-program under GTK+, but
I'm
having some problems in order to compile the examples.

I've installed GtkGLArea 1.2.2, being root, so "gdkgl.h" and "gtkglarea.h"
are in the "usr/local/include/gtkgl" directory.

When I compile the examples via "make install" I get no compile errors, but
if I try to make it using "gcc glpixmap.c -o glpixmap
`gtk-config --cflags --libs` -lMesaGLU -lMesaGL", it breaks with the
following errors:
/tmp/ccVjj5p0.o: In function `main':
/tmp/ccVjj5p0.o(.text+0x17): undefined reference to `gdk_gl_query'
/tmp/ccVjj5p0.o(.text+0x46): undefined reference to `gdk_gl_choose_visual'
/tmp/ccVjj5p0.o(.text+0x16d): undefined reference to `gdk_gl_context_new'
/tmp/ccVjj5p0.o(.text+0x19c): undefined reference to `gdk_gl_pixmap_new'
/tmp/ccVjj5p0.o(.text+0x1b1): undefined reference to
`gdk_gl_pixmap_make_current'
/tmp/ccVjj5p0.o(.text+0x285): undefined reference to `gdk_gl_context_unref'
/tmp/ccVjj5p0.o(.text+0x291): undefined reference to `gdk_gl_pixmap_unref'
collect2: ld returned 1 exit status

As mentioned, I've correctly installed GtkGLArea, having "gdkgl.h" and
"gtkglarea.h" under "usr/local/include/gtkgl" directory. So the "#include
<gtkgl/gdkgl.h>" line in "glpixmap.c" should be enough.

"gtk-config --cflags --libs" returns
"-I/usr/X11R6/include -I/usr/local/lib/glib/include -I/usr/local/include -L/
usr/local/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -
lXext -lX11 -lm"
Include directories seem to be right...

As you can see I'm totally lost. I hope anyone out there can help me, thanks

Ignacio Nodal Suarez
Escuela Universitaria de Informatica (ULPGC)
Las Palmas de G.C. -- Spain





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]