|
|

楼主 |
发表于 2006-2-21 15:36:00
|
显示全部楼层
Post by wcw
我用gcc -o hello hello.c 'pkg-config --cflags --libs gtk+-2.0'编译,
出错为
gcc: pkg-config --cflags --libs gtk+-2.0: 没有那个文件或目录
hello.c:1:20: error: gtk/gtk.h: 没有那个文件或目录
hello.c: In function 'main':
hello.c:3: error: 'GtkWidget' undeclared (first use in this function)
hello.c:3: error: (Each undeclared identifier is reported only once
hello.c:3: error: for each function it appears in.)
hello.c:3: error: 'window' undeclared (first use in this function)
hello.c:5: error: 'GTK_WINDOW_TOPLEVEL' undeclared (first use in this function)
我的gtk等都装在/usr/lib里,为什么会:gcc: pkg-config --cflags --libs gtk+-2.0: 没有那个文件或目录
我知道了,原来是`pkg-config……`,两边的不是单引号,而是esc下的那个点 |
|