wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar zxvf libiconv-1.14.tar.gz
cd libiconv-1.14/
./configure --prefix=/usr/local/libiconv
make && make install
出錯:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
解決方法:
cd libiconv-1.14/srclib
編輯stdio.in.h文件,搜索這句話
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
把這句刪除換成如下幾句
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif