Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何查询clang+的默认包含路径+;?_C++_Clang - Fatal编程技术网

C++ 如何查询clang+的默认包含路径+;?

C++ 如何查询clang+的默认包含路径+;?,c++,clang,C++,Clang,如何查询clang/clang++的默认包含路径?我试图使用定制的clang编译器(支持OpenMP的编译器),但它似乎找不到STL库: /usr/local/bin/clang++ hello.cpp hello.cpp:1:10: fatal error: 'iostream' file not found #include <iostream> ^ 1 error generated. 谢谢你的帮助 您正在寻找选项-v。使用clang++-c file.cc-v编

如何查询clang/clang++的默认包含路径?我试图使用定制的clang编译器(支持OpenMP的编译器),但它似乎找不到STL库:

/usr/local/bin/clang++ hello.cpp 
hello.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
     ^
1 error generated.

谢谢你的帮助

您正在寻找选项
-v
。使用
clang++-c file.cc-v
编译将打印以下内容:

#include "..." search starts here:
#include <...> search starts here:
 /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9
#包括“…”搜索从这里开始:
#包括搜索从这里开始:
/usr/bin/./lib/gcc/x86_64-linux-gnu/4.9/../../../../../../../../include/c++/4.9

等等。

您还可以使用
-H
选项打印用于编译特定文件的标题。
#include "..." search starts here:
#include <...> search starts here:
 /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9