Sunday, August 23, 2009

MinGW: Compiling LibReGIF

LibReGIF is an open-source library that reads GIF images. Download the libregif source and compile it as follows:


tar xzvf libregif-4.1.7.tar.gz

cd libregif-4.1.7/

./configure --prefix=/mingw

make

cp libregif.a /mingw/lib

cp libregif.a /mingw/lib/libgif.a

cp libregif.a /mingw/lib/libungif.a

cp gif_lib.h /mingw/include

gcc -shared -o /mingw/bin/libregif-4.dll lib/*.o

Then, create an import library for ReGIF like this:


cd /mingw/lib
echo EXPORTS > regif.def
nm /mingw/bin/libregif-4.dll | grep ' T _' | sed 's/.* T _//' | grep -i gif >> lzo2.def
dlltool --def regif.def --dllname libregif-4.dll --output-lib /mingw/lib/libgif.dll.a
cp libgif.dll.a libregif.dll.a
cp libgif.dll.a libungif.dll.a

No comments:

Post a Comment

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger