[英]ICC (14.0) cannot even compile hello-world in Ubuntu 13.10?
New to Linux, I just installed a Ubuntu 13.10 64 bit, with Eclipse 3.8 and intel's ICC 14.0. Linux新手,我刚刚安装了Ubuntu 13.10 64位,Eclipse 3.8和intel的ICC 14.0。
The GCC come with Ubuntu is version 4.8.1. GCC附带Ubuntu是4.8.1版本。
So far ICC installed cannot even compile hello-world in Eclipse due to it cannot compile iostream header. 到目前为止,ICC安装甚至无法在Eclipse中编译hello-world,因为它无法编译iostream头。
The iostream
header will include another header, called c++config.h
, stored in /usr/include/x86_64-linux-gnu/c++/4.8/bits
iostream
头将包含另一个头文件,名为c++config.h
,存储在/usr/include/x86_64-linux-gnu/c++/4.8/bits
The iostream
header itself stored in /usr/include/c++/4.8
iostream
标头本身存储在/usr/include/c++/4.8
The GCC compiler can compile the hello-world cpp and other c++ files perfectly, yet the ICC cannot even compile hello-world, tell me it cannot find c++config.h
header, even if I include its path in the project. GCC编译器可以完美地编译hello-world cpp和其他c ++文件,但是ICC甚至无法编译hello-world,告诉我它找不到
c++config.h
头文件,即使我在项目中包含它的路径。
Anyone know any work-around for this? 有人知道任何解决方法吗?
You can: 您可以:
Add system include on command line 在命令行上添加系统包括
icc -idirafter /usr/include/x86_64-linux-gnu/c++/4.8/ -I... -L... my.cpp icc -idirafter /usr/include/x86_64-linux-gnu/c++/4.8/ -I ... -L ... my.cpp
Permanently add it to icc.cfg 永久地将其添加到icc.cfg
cat /opt/intel/composer_xe_2013_sp1.1.106/bin/intel64/icc.cfg cat /opt/intel/composer_xe_2013_sp1.1.106/bin/intel64/icc.cfg
-idirafter /usr/include/x86_64-linux-gnu/c++/4.8/ -idirafter /usr/include/x86_64-linux-gnu/c++/4.8/
I successfully used this to compile scipy. 我成功地用它来编译scipy。
Two possibilities exist without changing too much of your setup: 在不改变太多设置的情况下存在两种可能性:
This kind of thing happens fairly often when mixing and matching different compilers and standard libraries. 在混合和匹配不同的编译器和标准库时,这种事情经常发生。 It helps if both are of roughly the same age.
如果两者的年龄大致相同,则会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.