Posted on 2009-03-20 16:47
vcommon 阅读(3133)
评论(0) 编辑 收藏 引用
http://www.mingw.org/wiki/msys
1:下载MinGW-5.1.4.exe
运行,自动下载并安装
2:MSYS-1.0.10.exe 安装
3:msysDTK-1.0.1.exe 安装
4:msysCORE-1.0.11-2007.01.19-1.tar.bz2
msysCORE是补丁,所以覆盖在源安装上,下同
5:bash-3.1-MSYS-1.0.11-1.tar.bz2
6:coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
csmake-3.81-MSYS-1.0.11-2.tar.bz2
7:....还有不少,不过现在没装
8:m4-1.4.7-MSYS.tar.bz2
9:以下是工具:../path/to/configure --prefix=/mingw && make && make install
autoconf-2.63.tar.bz2.tar
10:automake-1.10.1.tar.bz2.tar
11:libtool-2.2.tar.gz.tar
fatal error LNK1104: cannot open file "LIBC.lib"
error: C compiler cannot create executables
需要设置环境变量
set PATH=C:\MSDEV\VC98\BIN;C:\MSDEV\COMMON\MSDEV98\BIN ;mingw....
set INCLUDE=C:\MSDEV\VC98\INCLUDE
set LIB=C:\MSDEV\VC98\LIB
12: /etc/profile
PKG_CONFIG_PATH="/mingw/lib/pkgconfig"
CVS_RSH=ssh
CFLAGS="-pipe -O2 -mms-bitfields -march=i686"
just before
export HOME LOGNAME MSYSTEM HISTFILE
export HOME LOGNAME MSYSTEM HISTFILE CFLAGS PKG_CONFIG_PATH CVS_RSH
To install 3rd party library and applications which uses the autotools build system the following commands are often used.
./configure --prefix=/mingw
make
make install
13:gtk+-bundle_2.16.0-20090317_win32
add to path gtk+-bundle_2.16.0-20090317_win32\bin
14:glib-2.20.0
./configure --prefix=/mingw
make
make install
gettext error
15:将 gtk+-bundle_2.16.0-20090317_win32得include ,lib copy到E:\MinGW中
其实应该是设置好PKG_CONFIG_PATH,懒省事,就直接copy了
16:gtk+-2.16.0
./configure --prefix=/mingw
make
make install
remove define #ifndef GTK_DISABLE_DEPRECATED
OK,搞定,花费一天时间。编译3小时