error: gtk/gtk.h: No such file or directory
Below is my C code:
Code:
#include <gtk/gtk.h> Code:
anisha@linux-p0mg:~> gcc -I/usr/include/gtk-2.0/gtk/ j.c Quote:
Kindly guide ! |
May be you need to install gtk+ and libgtk+, I'm not sure though.
|
Quote:
I managed to solve the problem myself: Here's my solution: I had compiled it wrongly first of all ! Correct way: Code:
gcc -I/usr/include/gtk-2.0/ j.c glib.h, gtk.h, glib.h, glibconfig.h, pango.h, gdkconfig.h, atkobject.h, pkgconfig.h Then I did the following: Code:
export CPATH=$CPATH:/usr/include/gtk-2.0 and now I can compile it simply like this: gcc j.c |
Thanks for sharing the solution :)
|
Most welcome :D
|
I'm also starting out with gtk now. I struggled a lot with compiling hello-world until I found the 'GNOME Documentation Library'.
Basically, the pkg-config utility can produce all (or most of) the include options you need for compiling. try typing: Code:
pkg-config --libs gtk+-2.0 Code:
gcc `pkg-config --cflags --libs gtk+-2.0` hello.c -o hello I guess this means less cluttering of the environment, and you can easily change the 2.0 to 3.0 without rewriting all your scripts. thanks, tor |
I met the same problom that you countered,but resolved it
Actually,it's simple to resole,though it confused me a whole day.
Noting,there is diference between " ' " and " ` "," ' " is single quotes,the other symbol shares the key with "~". The correct symbol is last one that shared the key with "~". |
All times are GMT -5. The time now is 10:37 AM. |