Integrating Clang Within NetBeans?

核能气质少年 提交于 2019-12-03 19:02:51

问题


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.


回答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.




回答2:


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




回答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.



来源:https://stackoverflow.com/questions/8241862/integrating-clang-within-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!