Clang没有看到基本标题 [英] Clang doesn't see basic headers
本文介绍了Clang没有看到基本标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在Clora中编译Fedora 20上的简单hello world,并得到以下输出:
I've tried to compile simple hello world on Fedora 20 with Clang, and I get the following output:
d.cpp :1:10:致命错误:找不到iostream文件
d.cpp:1:10: fatal error: 'iostream' file not found
#include< iostream>
p>
#include <iostream>
我不知道如何解决它。
推荐答案
点3 解决了我的问题。
1。
有同样的问题,fedora 21 :: clang 3.5.0:
1. Had the same issue, fedora 21::clang 3.5.0:
clang++ -std=c++14 -pedantic -Wall test_01.cpp -o test_01 -v
2。
ignoring nonexistent directory "/usr/lib/gcc/i686-redhat-linux/4.9.2/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/bin/../lib/clang/3.5.0/include
/usr/include
End of search list.
test_01.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
3。
sudo yum install gcc-c++
4。
#include "..." search starts here:
#include <...> search starts here:
/bin/../lib/gcc/i686-redhat-linux/4.9.2/../../../../include/c++/4.9.2
/bin/../lib/gcc/i686-redhat-linux/4.9.2/../../../../include/c++/4.9.2/i686-redhat-linux
/bin/../lib/gcc/i686-redhat-linux/4.9.2/../../../../include/c++/4.9.2/backward
/usr/local/include
/usr/bin/../lib/clang/3.5.0/include
/usr/include
/usr/lib/gcc/i686-redhat-linux/4.9.2/include
End of search list.
这篇关于Clang没有看到基本标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文