MinGW: Building Iconv 1.13.1 for Windows

MinGW: Building Iconv 1.13.1 for Windows

Iconv is a character-set conversion tool. Iconv is useful by itself when you want to convert a text or HTML file from one encoding to another. The libiconv library is required by gettext, freetype and libcdio.

To build Iconv for Windows with MinGW compiler, download the Iconv source and compile iconv like this:

./configure --prefix=/mingw --disable-nls
make
make install

Iconv installs the following files on the system:

bin/iconv.exe
bin/libcharset-1.dll
bin/libiconv-2.dll
include/iconv.h
include/libcharset.h
include/localcharset.h
lib/libcharset.dll.a
lib/libcharset.la
lib/libcharset.a
lib/libiconv.dll.a
lib/libiconv.la
share/doc/libiconv
share/man/man1/iconv.1
share/man/man3/iconv*.3

Test: Execute the command iconv.exe --list in a Command Prompt.

Building Static LibIconv

Static libiconv is useful when you don't want your program looking for missing iconv.dll or libiconv-2.dll. Build a static version of libiconv like this:

./configure --prefix=/mingw --disable-shared --disable-nls
make
make install

Static build produces the following files:

bin/iconv.exe
include/iconv.h
include/libcharset.h
include/localcharset.h
lib/libcharset.a
lib/libcharset.la
lib/libiconv.a
lib/libiconv.la
share/doc/libiconv/

Here's my iconv.exe binary: iconv.exe

Building LibIconv with TDM-GCC

The procedure is the same as above except that you need to modify the WINDRES=line of src/Makefile.

WINDRES = windres -F pe-i386

For 64-bit build:

WINDRES = windres -F pe-x86-64
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值