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