|
hello示例程序编译出问题:
gcc -Wall -g helloworld.c -o helloworld `pkg-config --cflags gtk+-2.0` \
`pkg-config --libs gtk+-2.0`
gcc: pkg-config --cflags gtk+-2.0pkg-config --libs gtk+-2.0: 没有那个文件或目录
hello.c:1:21: gtk/gtk.h: 没有那个文件或目录
hello.c:5: error: syntax error before '*' token
hello.c: In function `hello':
hello.c:8: warning: implicit declaration of function `g_print'
hello.c: At top level:
hello.c:11: error: syntax error before "delete_event"
hello.c:11: error: syntax error before '*' token
hello.c:14: warning: return type defaults to `int'
hello.c: In function `delete_event':
hello.c:23: error: `TRUE' undeclared (first use in this function)
hello.c:23: error: (Each undeclared identifier is reported only once
hello.c:23: error: for each function it appears in.)
hello.c: At top level:
hello.c:27: error: syntax error before '*' token
hello.c: In function `destroy':
hello.c:30: warning: implicit declaration of function `gtk_main_quit'
hello.c: In function `main':
hello.c:37: error: `GtkWidget' undeclared (first use in this function)
hello.c:37: error: `window' undeclared (first use in this function)
hello.c:38: error: `button' undeclared (first use in this function)
hello.c:41: warning: implicit declaration of function `gtk_init'
hello.c:44: warning: implicit declaration of function `gtk_window_new'
hello.c:44: error: `GTK_WINDOW_TOPLEVEL' undeclared (first use in this function)
而pkg-config --cflags gtk+-2.0
和pkg-config --libs gtk+-2.0又能找到include等。 |
|