GTK 2.0 problem
hi
i have fedora core 4 on my system. i want to use gtk. 2.0 to compile following code file name :- gtk1.c #include <gtk/gtk.h> int main (int argc , char *argv[]) { GtkWidget *window gtk_init (&argc , &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); gtk_main(); return 0; } i use following command for compilation $ gcc gtk1.c -o gtk1 `pkg-config -cflags -libs gtk+-2.0` i get the following error cannot find gtk.h can any body help |
Try using this for the pkg-config part:
pkg-config --cflags --libs gtk+-2.0 Peace... |
hi tomdkat
Thanks for the reply, but i am not getting u, so please can u elobrate. |
Ok, in your post above change this:
$ gcc gtk1.c -o gtk1 `pkg-config -cflags -libs gtk+-2.0` to this: $ gcc gtk1.c -o gtk1 `pkg-config --cflags --libs gtk+-2.0` You need two dashes before "clfags" and "libs" to get the output you desire. Consider this: Code:
tom@linux:~$ pkg-config -cflags -libs gtk+-2.0 Peace... |
hi tomdkat
IT WORKS Thank you very much :) |
All times are GMT -5. The time now is 05:41 AM. |