/bin/sh ../../libtool –tag=CC –mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -mms-bitfields -IC:/MinGW/include/glib-2.0 -IC:/MinGW/lib/glib-2.0/include -IC:/MinGW/include/libpng14 -DG_DISABLE_SINGLE_INCLUDES -I/mingw/include -DGDK_PIXBUF_DISABLE_DEPRECATED -g -O2 -Wall -mms-bitfields -MT pixops.lo -MD -MP -MF .deps/pixops.Tpo -c -o pixops.lo pixops.c
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -mms-bitfields -IC:/MinGW/include/glib-2.0 -IC:/MinGW/lib/glib-2.0/include -IC:/MinGW/include/libpng14 -DG_DISABLE_SINGLE_INCLUDES -I/mingw/include -DGDK_PIXBUF_DISABLE_DEPRECATED -g -O2 -Wall -mms-bitfields -MT pixops.lo -MD -MP -MF .deps/pixops.Tpo -c pixops.c -DDLL_EXPORT -DPIC -o .libs/pixops.o
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -mms-bitfields -IC:/MinGW/include/glib-2.0 -IC:/MinGW/lib/glib-2.0/include -IC:/MinGW/include/libpng14 -DG_DISABLE_SINGLE_INCLUDES -I/mingw/include -DGDK_PIXBUF_DISABLE_DEPRECATED -g -O2 -Wall -mms-bitfields -MT pixops.lo -MD -MP -MF .deps/pixops.Tpo -c pixops.c -DDLL_EXPORT -DPIC -o .libs/pixops.o
gcc.exe: : Invalid argument
make[4]: *** [pixops.lo] Error 1
上述的編譯錯誤,奮鬥了兩天終於解決了,不是自己改錯的,而是上天幫助我找到Building Evolution on Windows的這一段:『
pkg-config for Win32 can be found on ftp.gnome.org, too, in http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/.
To work around a bug in MSYS bash, you need to create a file pkg-config.sh somewhere with the contents:
#!/bin/sh if pkg-config "$@" > /dev/null 2>&1 ; then res=true else res=false fi pkg-config "$@" | tr -d r && $res
And then set the environment variable PKG_CONFIG=/path/to/that/pkg-config.sh
』
也就是說,在MSYS裡,會有錯誤,所以需要新增一個pkg-config.sh的檔案,然後設定PKG_CONFIG,賓果,醬就對了,我把pkg-config.sh放在/mingw/bin下,設定PKG_CONFIG=/mingw/bin/pkg-config.sh,然後編譯這個套件就成功了,感謝神,又過一關了!