简体   繁体   English

已安装Intel C ++编译器,缺少/ bits / c ++ config

[英]Installed Intel C++ Compiler, missing /bits/c++config

I installed the intel c++ compiler, and sourced the compilervars.h file. 我安装了intel c ++编译器,并获得了compilevars.h文件。 (I think this is how you are supposed to set up the compiler). (我认为这是应该设置编译器的方式)。

When testing a simple HelloWorld! 测试一个简单的HelloWorld时! program compiling with the icpc command for bot the .cpp and .o files I am told that there is no /bits/c++config.h file. 程序使用icpc命令为bot编译.cpp和.o文件,我被告知没有/bits/c++config.h文件。 The file is not located under /usr/include/c++/4.8/bits or /usr/include/c++/4.8.1/bits. 该文件不在/usr/include/c++/4.8/bits或/usr/include/c++/4.8.1/bits下。 I have read up on this problem (there were a few threads about it) but could not figure out how to fix it. 我已经阅读了这个问题(有一些线程),但无法弄清楚如何解决它。

I got the program to compile by using gcc for the .cpp file and icpc for the .o file. 我通过将gcc用作.cpp文件并将icpc用作.o文件来进行编译。 gcc won't compile the .o file and icpc won't compile the .cpp file. gcc不会编译.o文件,而icpc不会编译.cpp文件。

I am a rookie to setting up programming environments because I mostly have just programmed via shh on school computers. 我是设置编程环境的新手,因为我大多数时候只是通过shh在学校计算机上编程。 Any help would be greatly appreciated. 任何帮助将不胜感激。

This shall be fixed by adding corresponding -I option to your compiling command. 这可以通过在编译命令中添加相应的-I选项来解决。 If your machine is x32, try something like 如果您的计算机是x32,请尝试类似

-I/usr/include/i386-linux-gnu/c++/4.8/

or 要么

-I/usr/include/x86_64-linux-gnu/c++/4.8/

for x64 machine. 对于x64机器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM