解决编译libiconv时报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
来源:互联网 发布:太早遇到对的人 知乎 编辑:程序博客网 时间:2024/06/05 17:19
转载自:http://forum.z27315.com/topic/15662-%E8%A7%A3%E5%86%B3%E7%BC%96%E8%AF%91libiconv%E6%97%B6%E7%9A%8439gets39-undeclared-here%E9%94%99%E8%AF%AF/
在编译libiconv时出错
./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
下面报
make[2]: *** [progname.o] Error 1make[2]: *** Waiting for unfinished jobs....make[2]: Leaving directory `/opt/sources/libiconv-1.14/srclib'make[1]: *** [all] Error 2make[1]: Leaving directory `/opt/sources/libiconv-1.14/srclib'make: *** [all] Error 2
Google搜了好久终于找到一篇文章《libiconv gets undeclared》真是雪中送炭啊。
wget -c http://www.itkb.ro/userfiles/file/libiconv-glibc-2.16.patch.gzcd libiconv-1.14/srclibpatch -p1 stdio.in.h
俺运行patch后好久都没有反应 :( 最后人肉修改
这个补丁的内容如下
--- srclib/stdio.in.h.orig 2011-08-07 16:42:06.000000000 +0300+++ srclib/stdio.in.h 2013-01-10 15:53:03.000000000 +0200@@ -695,7 +695,9 @@ /* It is very rare that the developer ever has full control of stdin, so any use of gets warrants an unconditional warning. Assume it is always declared, since it is required by C89. */-_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 #endif
0 0
- 解决编译libiconv时报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- 编译安装libiconv报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- 源码编译安装 libiconv-1.14 报:./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function) [
- 编译 libiconv-1.14 的时候出现 ./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- Ubuntu14.04_64编译libiconv出问题 ./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- ./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)
- 解决nagios报错:./stdio.h:456:1: error: 'gets' undeclared here (not in a function)的问题
- 解析linux patch(解决报错./stdio.h:456:1: error: 'gets' undeclared here (not in a function))
- ./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
- libiconv-1.14 error: ‘gets’ undeclared here (not in a function)
- 在ubuntu上编译toolchain时出错./stdio.h:477: error: 'gets' undeclared here (not in a function)
- PHP扩展开发报错解决[error: ‘PHP_FE_END’ undeclared here (not in a function)] .
- 编译libiconv-1.14解决./stdio.h:1010:1: 错误: ‘gets’未声明(不在函数内)错误
- `uint32_t' undeclared here (not in a function)
- /phalcon.zep.c:130892: error: ‘ZEND_FE_END’ undeclared here (not in a function)
- /data/TestModule2/TestModule.c:26:25: error: ‘UTS_RELEASE’ undeclared here (not in a function) char
- 【SystemTap】 2.6.36 内核下运行SystemTap出现 error:‘param_ops_int64_t’ undeclared here (not in a function) 错误
- Android之ndk-build出现c:28:51: error: 'get_string' undeclared here (not in a function)解决办法
- HDOJ Osu! 5078【2014鞍山区域赛I题-水】
- Linux信号列表
- Python中逐行读取文件内容的办法
- 利用Qt来实现一个时钟小程序
- 深入探讨在集群环境中使用 EhCache 缓存系统
- 解决编译libiconv时报错:./stdio.h:1010:1: error: 'gets' undeclared here (not in a function)
- 非常详细GC学习笔记
- springMVC学习笔记---修改配置文件路径和传递数据
- Shell脚本中执行mysql语句
- 如何快速的将pdf转换成txt格式
- ext的相关
- JAVAweb 学习总结
- java中二叉排序树模型的建立
- mysql数据库数据迁移方法