20

I am unable to build a simple hello world application using clang-6.0 on bionic beaver, the build command fails with below error.

 clang++-6.0 -std=c++17 -stdlib=libc++ hello.cc -o hello 
/usr/bin/ld: cannot find -lc++abi
clang: error: linker command failed with exit code 1 (use -v to see invocation)

what is this c++abi library and where can i find it ?? Please advise.

3

2 Answers 2

29

sudo apt-get install libc++abi-dev command will fix the problem.

If you are using a non-default version of Clang, you will have to install a more specific version, e.g. libc++abi-12-dev.

Sign up to request clarification or add additional context in comments.

Comments

1

Thanks @Ravikumar-Tulugu and @Martin-Valgur. In my case (Fedora) I installed the equivalent that is in package lbcxxabi.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.