Originally Posted by
hessiess
Wright your own GUI lib which renders using OGL, like Blender for example.
Thats a tad excessive for a solution.
The error is because the compiler cant find the header file, gtk/gtkgl.h. Which I can see you are aware off. This header file in not in the default search location, /usr/local/include or /usr/include. It is in a sub directory of the base folder gtkglext or something so gtk/gtkgl wont find it.
On my computer to compile a c program using said library I would need to do something like -
Code:
gcc -I/usr/include/atk-1.0 -I/usr/include/gtkglext-1.0 -I/usr/lib64/gtkglext-1.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -Wl,--export-dynamic -latk-1.0 -lgdkglext-x11-1.0 -lGLU -lGL -lXmu -lXt -lSM -lICE -lgdk-x11-2.0 -lpangox-1.0 -lX11 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -o hello bob.c
for example, now that is a pain in the ... so you can store it in your build file or you can just use pkg-config if you have it installed.
Code:
gcc `pkg-config --cflags --libs gdkglext-1.0` -I/usr/include/atk-1.0/ -latk-1.0 -o hello bob.c
That is how I do it when I'm playing with this stuff, whether that is the best solution or not, I don't know
Bookmarks