Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Add clang with libc++ (LLVM)
Add clang with libc++ (LLVM) [message #1802393] Thu, 07 February 2019 20:51 Go to next message
Eclipse UserFriend
main.cpp compiles successfully from the command line with the following command:

clang++ -std=c++14 -stdlib=libc++ -I/usr/local/include/boost-1_69 -DBOOST_LOG_DYN_LINK main.cpp -o test -L/usr/local/lib -lboost_log-clang6-mt-x64-1_69 -lpthread -lboost_thread-clang6-mt-x64-1_69 -lboost_system-clang6-mt-x64-1_69


2. My eclipse variant is I believe 'R'. The specific filename is: eclipse-cpp-2018-12-R-linux-gtk-x86_64.tar.gz

My goal is to add LLVM (clang) support to Eclipse C++.

The steps are as follows:
Help->Install New Software-> Select "All Available Sites" from the pull down menu next to the Add button.
Select C/C++ Development Tools and C/C++ LLVM Family-Compiler as shown in 20-13-24.png
Select Next->Next->Accept Terms/Finish->(pop up)Restart Now to restart the IDE

From the Preferences menu I now have an LLVM option under C/C++ and will attempt to set library search path directory and LLVM installation folder.
Noteworthy: The LLVM dialog had the following pre-filled entries. The Libraries section had stdc++ and 'Library search path directories had ' /usr/lib/gcc/x86_64-linux-gnu/7/'

If I create a managed project and choose LLVM with Clang (Lang) the search path and stdc++ is reflected as shown in 20-23-55.png.

Herein lies the issue. I've tried to delete ' /usr/lib/gcc/x86_64-linux-gnu/7/' and stdc++ from my project and the LLVM menu to no avail. Those entries keep recurring (coming back) automatically during compilation.

What i want is libc++ not libstdc++ and the path should not reflect 'gcc' but my clang path. How can i fix this?

The installer picks those entries by default and that's not what I want.
Re: Add clang with libc++ (LLVM) [message #1802434 is a reply to message #1802393] Fri, 08 February 2019 14:21 Go to previous message
Eclipse UserFriend
Try this solution, I've recently managed to compile a C++ program with llvm/clang++/libc++. I'm using Eclipse 2018-12 on Manjaro (Arch Linux distro).
Previous Topic:How to force Eclipse CDT to use only libc++?
Next Topic:Can't load costumed Arduino Library in the Arduino Downloads Manager
Goto Forum:
  


Current Time: Fri Oct 31 17:04:40 EDT 2025

Powered by FUDForum. Page generated in 0.03918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top