我写了一个程序(使用协程),并试图在Ubuntu 18.04.4LTS上用clang 9编译它,但我得到了这个错误:
$ clang++-9 -stdlib=libc++ -std=c++2a coroutins_iterator.cpp
/usr/bin/ld: cannot find -lc++abi
clang: error: linker command failed with exit code 1 (use -v to see invocation)我如何编译我的程序?哪里出了问题?
我安装libc++的时候
sudo apt-get install libc++-dev发布于 2020-04-09 06:11:14
看起来你安装了错误的libc++版本。据我所知,libc++-dev指的是Ubuntu18.08存储库中的版本6,而不是版本9。对于Clang 9,您需要安装相应版本的libc++:
sudo apt-get install libc++-9-dev这也应该安装匹配版本的libc++abi。
https://stackoverflow.com/questions/61110461
复制相似问题