转自湾湾一同学博客,百度的那个真的不靠谱
环境:(其他环境应该也可以用类似解法只是路径不同要自己找一下)
Cygwin
clang++ --version:5.0.1
主要是要写C++时,ale报错:
([clang] ‘iostream’ file not found [W ])
感觉是clang的问题,就来解决啦
ps 图片中的 10055_Hashmat_the_brave_warrior 就自动换成test 啰
首先找不到iostream是因为clang没搜寻到存放的资料夹
(fatal error: ‘iostream’ file not found)
可以使用加上-v 查看搜寻路径
$ clang++ -c test.cpp -v
不过查看其实没啥用,还是会显示没找到iostream
所以要直接加入路径,我是直接使用gcc的路径
$ clang++ -c test.cpp -isystem /lib/gcc/x86_64-pc-cygwin/6.4.0/include/c++
但是会显示另一个错误,就是找不到bits/c++config.h
(fatal error: ‘bits/c++config.h’ file not found)