user997112
user997112

Reputation: 30615

Stop Netbeans automatically including missing headers

I have noticed Netbeans 8.2 occasionally includes missing headers for C++ projects. By this I mean Netbeans actually enters 'include' and the file name. I think this occurs when I compile (within Netbeans). It tries to be smart and detect that I forgot to include <array>

and therefore it inserts:

#include <c++/4.8.2/array>

Is there a way to disable this automatic including of headers?

Upvotes: 0

Views: 254

Answers (2)

The Phuong Luu
The Phuong Luu

Reputation: 11

With Netbeans 11.2, try:

Tools > Options > Editor > Code Completion > Language choose C/C++

Uncheck "Auto Insert #include ...".

Upvotes: 1

user997112
user997112

Reputation: 30615

Found it:

Tools->Options->Code Completion->C/C++

then untick "Auto insert #include directives for Completed Identifiers"

Upvotes: 0

Related Questions