In file included from xxx.h 错误

最近写完代码提交到服务器上编译时出现了以下的编译错误,各种搜索尝试无果,关键问题还不清晰,一怒之下,直接在linux上重新建个文件重新写过,发现一摸一样的代码竟然。。。
编译通过了。。。过了。。。了。。。
唯一的区别就是原先是在win下用si创建的文件,一个是直接在linux下创建的。
估计是文本格式的影响?

In file included from /data/home/dailybuild/trunk/src/include/precompiled_header.h:4,
                 from check_c.h:11,
                 from check_c.cpp:8:
/usr/include/unistd.h:28: error: expected constructor, destructor, or type conversion before ‘extern’
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/new:40,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/new_allocator.h:33,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/x86_64-redhat-linux/bits/c++allocator.h:34,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/allocator.h:48,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/deque:62,
                 from /data/home/dailybuild/trunk/src/include/precompiled_header.h:20,
                 from check_c.h:11,
                 from check_c.cpp:8:
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/exception:35: error: expected declaration before end of line
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容