| 网站首页 | 业界新闻 | 小组 | 交易 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
共有 7748 人关注过本帖
标题:Linux编译错误怎么办? 不是代码问题!
只看楼主 加入收藏
梦米奇
Rank: 1
等 级:新手上路
帖 子:8
专家分:2
注 册:2013-7-12
结帖率:50%
  问题点数:0  回复次数:1   
Linux编译错误怎么办? 不是代码问题!
源码:main.cpp
#include <stdio.h>

int main()
{

        return 0;
}

~# g++ main.cpp
结果:  出现下面一大堆错误,大神们  这个怎么办?求解决。。。
In file included from main.cpp:1:
/usr/include/stdio.h:28:23: error: features.h: No such file or directory
In file included from /usr/include/libio.h:62,
                 from /usr/include/stdio.h:72,
                 from main.cpp:1:
/usr/include/sys/cdefs.h:46:44: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:50:44: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:138:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:196:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:205:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:214:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:223:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:235:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:245:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:254:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:262:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:276:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:286:20: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:291:20: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:298:19: error: missing binary operator before token "("
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include/stddef.h:214: error: expected constructor, destructor, or type conversion before ‘typedef’
/usr/include/stdio.h:46: error: expected constructor, destructor, or type conversion before ‘typedef’
/usr/include/stdio.h:62: error: expected constructor, destructor, or type conversion before ‘typedef’
/usr/include/sys/cdefs.h:46:44: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:50:44: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:138:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:196:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:205:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:214:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:223:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:235:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:245:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:254:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:262:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:276:19: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:286:20: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:291:20: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:298:19: error: missing binary operator before token "("
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/include/stddef.h:214: error: expected constructor, destructor, or type conversion before ‘typedef’
/usr/include/stdio.h:46: error: expected constructor, destructor, or type conversion before ‘typedef’
/usr/include/stdio.h:62: error: expected constructor, destructor, or type conversion before ‘typedef’
搜索更多相关主题的帖子: included return before Linux 
【推荐】大型监控、工控、组态VC++./C#源码组件库2019下载!
【推荐】超50万数控、建模仿真、电力VC++/.NET图形源码库下载!
【推荐】专业CAD\GIS\业务流程VC++/C#可视化图形软件源码库下载!
2013-12-13 15:04
zwhyk
Rank: 1
等 级:新手上路
帖 子:3
专家分:2
注 册:2013-11-7
  得分:0 
系统没有标准库,也就是说没有stdio.h文件。这个站太冷漠了。你去下glic的标准库就可以了。
2013-12-21 17:50
快速回复:Linux编译错误怎么办? 不是代码问题!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.129262 second(s), 8 queries.
Copyright©2004-2019, BCCN.NET, All Rights Reserved