I am trying to compile the gtk hello world program but gcc can't seem to find gtk.h. The header files are in the usr directory. How do i fix this?
I am trying to compile the gtk hello world program but gcc can't seem to find gtk.h. The header files are in the usr directory. How do i fix this?
silk.odyssey
are they in the includes directory? ie: /usr/include/
Yes they're in /usr/include/gtk-2.0. Anyway instead of trying to compile it from the commandline, I created a gtk project with anjuta and removed the extra files it generated by default and pasted my original code and it worked fine. I'm also downloading a newer version of gtk.
silk.odyssey
Bah makefile all the way glad you got it working
Glad to see yoyu are getting into GTK. I am okay; I havent' done it in a while. But if you need help feel free to ask here.
Well I'm curious about GUI programming on linux and the C interface to gtk doesn't look too scary like other frameworks like KDE
silk.odyssey
It isn't hard. I thought so. Easier than windows programming if it is as hard as it freaking looks. So ugly IMO
lol windows programming can be tedious but i would prefer that than KDE. I guess its because I don't know C++ well
silk.odyssey
Well, you probably forgot to link the the gtk+ library. If you would want to compile it from the command line remember to use pkg-config (for gtk 2.0 and higher).
gcc -Wall -o hellogtk hellogtk.c `pkg-config gtk+-2.0 --cflags --libs`
Try that and it will probably compile from the command line.
Welcome to the boards Dan. In the future you may wish to avoid responding to threads that are dead. This thread is over two weeks old and the orginally poster has already responded that they have it working.