• Examples


    今天搭建环境的时候,出现了'gets' undeclared here (not in a function)问题,查了一些资料。根据http://forum.z27315.com/topic/15662-解决编译libiconv时的gets-undeclared-here错误/     的步骤,解决了问题。

    我也是下载了补丁包,但是不会解压。。所有没有用这个补丁包。有会解压这个补丁的请告诉我一下。谢谢。

    下面说说我是怎么解决的:

    1、在命令行输入:find -name stdio.in.h。查到有两个文件中含有stdio.in.h.

    ./huangwork/atom-sdk/install_sdk/IntelCE-0.34.13452.340510/project_build_i686/IntelCE/autotools-0.29.12293.323798/building/m4-1.4.13/lib/stdio.in.h
    ./huangwork/atom-sdk/install_sdk/IntelCE-0.34.13452.340510/project_build_i686/IntelCE/bison-0.29.12232.321541/bison-2.4.2/lib/stdio.in.h
     
    2、打开第一个文件中的stdio.in.h,没有找到
    _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
    打开第二个找到了。
    然后
    -_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

    即:把第一行注释掉,所以用-表示注释,然后添加第二行和第三行。最后不要忘了添加#endif。
    3、编译,通过!!!!
     
    非常感谢网友的帮助。
  • 相关阅读:
    STL: merge
    STL: rotate
    javascript的prototype继承问题
    日期正则表达式
    有关linq的一系列学习的文章,值得收藏
    EF读取关联数据
    jQuery UI中的日期选择插件Datepicker
    LINQ的基本语法中八个关键字用法说明
    Shell变量内容的删除、替代与替换
    Shell命令别名与历史命令
  • 原文地址:https://www.cnblogs.com/hjj801006/p/3988220.html
Copyright © 2020-2023  润新知