Integrating Clang Within NetBeans?

10,343

Solution 1

NetBeans 7.2 has supported Clang natively.

Just open up Options Window, switch to C/C++ section, and add a new Tool Collection. Type: /usr/bin in Base Directory, and select "CLang" in the combo box.

I have been using Clang to build my project, and NetBeans works with Clang perfectly.

Solution 2

Here is a link to the bug report for clang support in netbeans at netbeans.org. Track this bug for official netbeans support.

Solution 3

If you have downloaded and installed the C/C++ plug-in for NetBeans 8+ following the instructions on this page:

https://netbeans.org/community/releases/80/cpp-setup-instructions.html

you have a C/C++ item in the upper menu of the Tools > Options panel. 1.) Click it.

2.) Now under the list called "Tool Collection" (on the left) click the left button "Add".

3.) In the window that opens, enter the "/usr/bin" as a base directory.

4.) If you have a CLang compiler installed right the "Tool Collection Family" drop-down menu will show a CLang collection. Choose it.

5.) Click "OK" in the pop-up window, then click "OK" in the "Options" panel/window.

Enjoy.

Share:
10,343
haziz
Author by

haziz

Updated on June 03, 2022

Comments

  • haziz
    haziz almost 2 years

    What are the steps involved in integrating Clang within NetBeans? I would like to also see the Clang error and warning messages from within NetBeans. This will be used mainly for developing in C.

  • user1055604
    user1055604 about 12 years
    its current status is TBD (to-be-decided)
  • seamlik
    seamlik almost 5 years
    @StellarVortex Wherever you install your LLVM toolchain, use the directory containing clang.exe as the "Base Directory".