This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have Ubuntu system and gcc/g++-4.5.2 installed. And netbeans IDE c++ code assistance reports that it can't find some include files and underlines corresponding #include directives with red wave line. For example it could not find the stddef.h which is in /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include on my system. I assume CND's code assistance does not use this search path by default. Need to get default include search paths from the output of the following command: $ echo "" | g++ - -v -E here is the excerpt from the command output: ... #include <...> search starts here: /usr/local/include /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed /usr/include/i386-linux-gnu /usr/include End of search list. ...
We do get include paths and predefined macros from compiler. What is your NB version? Can you check Tools->Options->C++->Code Assistance?
NB version is 7.0.1. I checked Tools->Options->C++->Code Assistance and it looks like all paths are there, but these paths are from g++-4.4. It appeared that I have both packages installed g++-4.4 and g++-4.5 and g++ is symlinked to g++-4.5. I had Netbeans 6.9 installed some time ago, probably when I was using g++-4.4, later I upgraded to g++-4.5. Today I installed NB 7.0.1 and it imported settings from my old NB installation, and looks like it did not update paths to g++-4.5's ones. In the Build Tools I used the Restore Defaults button and it rescanned the system and updated the paths. But, it still can't find that stddef.h. I created a new "C++ Application" project and it generated main.cpp which includes the <cstdlib> and it is underlined with yellow line, opening the file it leads to include of <stddef.h> which is underlined with red. But, if including that stddef.h directly to main.cpp it works ok and the file can be found.
Go to Tools->Options->C++->Build Tools and press "Restore Defaults" button. Then close Options and in project context menu try Code Assistance->Reparse Project can you try to run NB: - with clean userdir (i.e. start nb with option --userdir /path/to/folder) - and without importing options from old NB instance? Does it work?
Ok, now it works. Just Reparsing the project did not help. I had to turn Code assistance off and the turn it on again and only then reparse the project. Thanks for help! Close the bug as invalid please.