|
在Mingw下编译是正常的,类似
gcc -o obj obj.c `pkg-config --cflags --libs gtk+-2.0`
其中obj.c 只是 #include <gtk/gtk.h>
#echo $PKG_CONFIG_PATH
#/e/Progra~1/Common~1/GTK/2.0/pkgconfig
但是发现在Cygwin中还是不行
gcc -o obj obj.c `pkg-config --cflags --libs gtk+-2.0`
显示
-----------
package gtk+-2.0 was not found in the pkg-config search path.
perhaps you should add the directory containing 'gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
----------
但是按说是可以找到的.
#echo $PKG_CONFIG_PATH
#/usr/X11R6/lib/pkgconfig:/cygdrive/e/PROGRA~1/COMMON~1/GTK/2.0/lib/pkgconfig
#ls /usr/X11R6/lib/pkgconfig
WINGs.pc
gtk+-2.0.pc
gtk-2.0.PC
wmlib.pc
wrlib.pc
xcomposite.pc
xcursor.pc
xdamage.pc
xevie.pc
xfixes.pc
xft.pc
xrender.pc
#cat /usr/X11R6/lib/pkgconfig/gtk+-2.0.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include
target=x11
gtk_binary_version=2.4.0
gtk_host=i686-pc-cygwin
Name: GTK+
Description: GIMP Tool Kit (${target} target)
Version: 2.6.10
Requires: gdk-${target}-2.0 atk
Libs: -L${libdir} -lgtk-${target}-2.0
Cflags: -I${includedir}/gtk-2.0
----------------------------------------
有谁可以麻烦指点一下吗? |
|