Is it possible to use Clang/LLVM with Eclipse CDT and if so, how is it configured to actually make it work?
I am the main author of the (only) LLVM plug-in for Eclipse CDT. It is still in development so might not be suitable for production environment yet. However feel free to test it to find out if it is suitable for your needs.
https://github.com/TuononenP/llvm4eclipsecdt
UPDATE
The latest version is available via official Eclipse update site: http://download.eclipse.org/releases/mars
It is under Programming Languages and is named "C/C++ LLVM-Family Compiler Build Support".
Here is the LLVM plugin for CDT http://code.google.com/p/llvm4eclipsecdt/
And here ↑↑↑↑ is its author, Petri Tuononen. Thank you, Petri!
Related
Although it is theoretically possible to integrate an external static analyzer into Eclipse as demonstrated here (i.e. for Cppcheck), I was wondering whether a more up to date solution exists which does not require plug-in development? For example an existing plug-in, an available option in CODAN or a simplified version of the above tutorial for Clang Static Analyzer specifically.
CodeCheckerEclipsePlugin is an Eclipse plugin that shows Clang Static Analyzer and Clang Tidy defects for your C/C++ projects.
After installation you can add it to your CDT project as "CodeChecker nature". The only software requirement is that you must have Clang and CodeChecker tools installed on your machine. You will need to set up your project so it builds from from Eclipse CDT. Clang static analyzer will be called automatically on your code whenever you build your project in eclipse.
The plugin will call the CodeChecker tool in the background which in turn calls the analysis engines (tidy and static-analyzer) on your build.
As an extention to ClangSA, you may also suppress false positives by using codechecker_suppress code comments like: // codechecker_suppress [deadcode.DeadStores] suppress deadcode
The plugin is hosted on github, see https://github.com/Ericsson/CodeCheckerEclipsePlugin
No. But possible? Yes. All it takes is volunteers to make it happen.
You can take a look at Artemis plugin. Open source project with real-time check based on CODAN framework and quickfix support.
I was trying to set up my development environment on Eclipse CDT for C++ and although the auto-complete is working (it finds classes like vector and such) it shows no documentation on C++ stuff, only C stuff (fopen, fclose, malloc) has documentation appearing on the auto-complete.
Some notes:
I'm using Linux Mint and Eclipse Kepler Service Release 1 Build id: 20130919-0819
I had to manually install g++ on my Linux. I used 'sudo apt-get install g++-4.7' to install it
I had to manually place "/usr/include/c++/4.7.3/" on the GCC C++ Compiler Includes in the Tool Settings in the project properties to get it to compile.
Any ideas on how to get the documentation in there?
The help on C is provided by Libhover plugin. The developers tried to support C++ but seems these efforts did not get much traction.
C++ hover is actually installed by default in CDT. If not, you can install it manually (at CDT site look for "Plugins for C/C++ library hover help." and "Plugins for creating hover help from installed C devhelp documentation").
However, it is not enough. To get hovering help similar to C documentation you have to generate Doxygen XML for your library, e.g. for STL. Details are provided in hover documentation
How difficult is to use codelite on top of a scons project?
what features i should expect to lose? is there a way to configure codelite to use the scons configuration files to keep track of the project files.
At the moment i'm using Netbeans 7.1, but the tool doesn't scale well with complex projects like LLVM. I'm curious with codelite as it seems to have a very good code completion architecture (relying on the llvm clang plugin) but i'm not sure how hard will it be to migrate my project (based on scons) to it
I dont know anything about codelite, but eclipse is an excellent IDE with code completion like you mention. There is an SCons plugin available for eclipse called SConsolidator.
I have found that eclipse has excellent support for C++ and Python.
Why not?
But codelite is old-school IDE with very poor functional, like Visual Studio 6. I recommend use Eclipse CDT.
I am looking for a C++ IDE, typically for debugging purpose. In particular, where I can navigate in source code; say method definition, member declaration etc.
I am a Java developer and use Eclipse. I create J2ME project in Eclipse, build it and finally deploy it at same place. At the time of debugging I can easily trace out what I am looking for.
For C/C++ support I installed plug-in "Eclipse C/C++ Development Tools".
After installing above plug-in, C/C++ code open with font/style/color...but not able to navigate :(
Please help me.
Thanks,
Amit
the cdt plugin from eclipse works fine for me. Perhaps you should update to the latest version and make sure you change your perspective to c++.
Another great c++ ide is qtcreator.
Is it possible to use Clang/LLVM with Eclipse CDT and if so, how is it configured to actually make it work?
I am the main author of the (only) LLVM plug-in for Eclipse CDT. It is still in development so might not be suitable for production environment yet. However feel free to test it to find out if it is suitable for your needs.
https://github.com/TuononenP/llvm4eclipsecdt
UPDATE
The latest version is available via official Eclipse update site: http://download.eclipse.org/releases/mars
It is under Programming Languages and is named "C/C++ LLVM-Family Compiler Build Support".
Here is the LLVM plugin for CDT http://code.google.com/p/llvm4eclipsecdt/
And here ↑↑↑↑ is its author, Petri Tuononen. Thank you, Petri!