我更新了clang,显然它忘记了在哪里可以找到标准库,即
reactions/baseReaction.cc:11:10: fatal error: 'vector' file not found
#include <vector>
我通过以下方式安装libc ++
sudo apt-get install libc++-dev
但是当我尝试
ln -s /usr/bin/c++ /usr/bin/clang++-libc++
它给出了
ln: failed to create symbolic link ‘/usr/bin/clang++-libc++’: File exists
我仍然不能使用make
编辑:尝试过
sudo update-alternatives --config c++
和
CXX=clang++-libc++ make
到目前为止没有快乐
EDIT2:使用CXX = clang ++-libc ++修改makefile似乎有效。
答案 0 :(得分:2)
比起手动创建符号链接,更可取的是,由于您似乎在基于Debian的系统上,因此可以尝试sudo update-alternatives --config c++
来让操作系统为您创建该符号链接。它应该显示您已在系统上安装的所有C ++编译器的选择。 (另请参阅update-alternatives
的手册页以供将来参考,无论是本地的还是online here。)
请注意,如果您要使文件/usr/bin/c++
成为指向/usr/bin/clang++-libc++
的符号链接,则论据顺序是错误的。一个好的经验法则是,对ln
使用与cp
或mv
相同的参数顺序。