How to build giflib in the MSYS?
来源:互联网 发布:我国网络直播规模 编辑:程序博客网 时间:2024/06/10 05:21
How to build giflib in the MSYS?
Where to downloadthe source codes?
giflib-4.1.4.tar.bz2
How to extract it?
$ tar xvjf ./giflib-4.1.4.tar.bz2
How to build andinstall it?
Step1: Edit /etc/profile and add three entries.
export perllibdir=.:/usr/share/aclocal:/usr/share/aclocal-1.9:/usr/share/automake-1.9:$perllibdir
alias aclocal='aclocal --acdir=/usr/share/aclocal -I /usr/share/aclocal-1.9 -I /usr/share/automake-1.9'
alias automake='automake --libdir=/usr/share/automake-1.9'
My system use automake-1.9. If readers are different, pleaserevise this version.
Step2: Edit giflib-4.1.4/autogen.sh
#!/bin/sh
# This script runs commands necessary to generate a Makefile for libgif.
echo "Warning: This script will run configure for you -- if you need to pass"
echo " arguments to configure, please give them as arguments to this script."
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
THEDIR="`pwd`"
source /etc/profile
cd $THEDIR
cd $srcdir
aclocal
autoheader
libtoolize --automake
automake --add-missing
autoconf
automake
cd $THEDIR
$srcdir/configure $*
exit 0
Step3: Build and Install it
$ ./autogen.sh --prefix=/mingw --disable-shared --enable-static
$ MY_CURR_PATH=`pwd`
$ make CFLAGS="-Du_int32_t=uint32_t -I$MY_CURR_PATH/lib $CFLAGS"
$ cd ./util
$ gcc -Du_int32_t=uint32_t -I$MY_CURR_PATH/lib -Du_int32_t=uint32_t -I/lib gifclrmp.c -o gifclrmp –L$MY_CURR_PATH/lib -L$MY_CURR_PATH/lib/.libs –lgif –lgetarg
$ gcc -Du_int32_t=uint32_t -I$MY_CURR_PATH/lib -Du_int32_t=uint32_t -I/lib gifrotat.c -o gifrotat -L$MY_CURR_PATH/lib -L$MY_CURR_PATH/lib/.libs -lgif –lgetarg
$ cd ..
$ make install
[Summarization]
1. u_int32_t has not been defined in the source codes, so Iuse MACRO to replace it with ease.
2. The configure file utilizes relative path to indicateswhere the header files locate, and it will lead to compiler error. As a result,the absolute path is adopted.
3. Both gifclrmp and gifrotat don’t have a proper compilingrules, it will fail to compile lack of the relative libraries. It should be abug of configure.ac in the MSYS! As a result, I do with it manually:- (.
- How to build giflib in the MSYS?
- How to build libDTS in the MSYS?
- How to build libpng in the MSYS?
- How to build the environment of MSYS in the windows?
- How to install VIM in the MSYS?
- How to install live555 in the MSYS?
- How to build libA52 in the MSY?
- How to build the environment of MSYS for the crossing compiler?
- How to build the environment of XPCOM in Windows XP
- How to build the GCC-4.3.3 in MinGW?
- How to build the webkitgtk
- How to generate monkeyrunner build-in help?
- How to build parport related driver upon parport module in the kernel
- how to check in code to ooo-build
- How to Resolve the 'Error MSB6006 tsc.exe exited with code 2' build error in Visual Studio 2015
- How to remove ^M in the file
- How to change the timeout in FXCop
- How to set the style in valuelist
- 正则表达式30分钟入门教程
- 获取从键盘上输入值
- sql 的ddl和dml
- 【转】Flex中使用Shared Object
- C++多线程编程入门
- How to build giflib in the MSYS?
- 参加新网络营销大会记录
- pku 2195 Going Home(最小费用最大流)
- using namespace 详解
- jsp中response.sendRedirect()中文参数乱码问题
- 健身
- Fedora8的GDM主题修改指南
- Ruby on rails开发从头来(windows)(九)-给购物车添加错误处理
- 面试问题不是我想像中的样子。。更不像我们训练的样子。。