jradxl
jradxl

Reputation: 555

How to set up Netbeans 12 with CCLS for C/C++ programming on Ubuntu 21.04

How do I set up Netbeans 12.3 on Ubuntu 21.04 for C/C++ programming? In Netbeans the plugin is marked as Temporary, and says it uses CCLS (CC Language Server). I can install that native with "apt install ccls" In Netbeans under Tools/Options/C/C++ the path /usr/bin/ccls is set. In Project Properties there are two options, Editor and Build For Editor I can guess I write, "gcc hello.c -o hello.out" For Build, there are Build, Clean and Run data entry textboxes, which I can write:- Build: "gcc hello.c -o hello.out" Run: "hello.out"

But nothing works properly. CCLS search gets me to "https://github.com/MaskRay/ccls", but there is nothing in the Editor Configuration for Netbeans.

Anyone?

Upvotes: 5

Views: 10704

Answers (1)

T0maas
T0maas

Reputation: 412

Which plugin do you use? CPPLite Kit or C/C++ from NetBeans 8.2 Plugin Portal. You can try C/C++: Open Plugins (Tools >> Plugins) window and switch to tab Settings and select NetBeans 8.2 Plugin Portal. Then go to tab Available Plugins and click Check for Newest and search for C/C++.

If you want to use CPPLite Kit you must have .ccls file in your project directory. Right click on your project select Properities and in the Editor section set path of Compile Commands to .ccls file in your project folder.

.ccls file can contain this:

g++
-xc++
-Iinclude
-std=c++17

.ccls is whole name of the file, not like something.ccls.

Upvotes: 4

Related Questions