GitHub user discordDOTtest added a comment to the discussion: How to enable
code completion for C/C++ in NetBeans 29 on Ubuntu
The file compile_commands.json was the key.
For others who need a starting point:
Create a simple main.c file in a folder - in this example in
/home/user-name/netbeans/hello-world
```
#include <stdio.h>
int main(){
puts("Hello, World!");
return 0;
}
```
add this compile_commands.json to the same folder
`[
{
"directory": "/home/user-name/netbeans/hello-world",
"command": "/usr/bin/gcc main.c -o main",
"file": "main.c"
}
]`
and set the path to the json file in Project Properties.
GitHub link:
https://github.com/apache/netbeans/discussions/9351#discussioncomment-16637939
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists