I am working with a small group on a C++ project in NetBeans.
For some reason, NetBeans is reporting things like "string", "endl", "cout" as "Unable to Resolve" even though the correct libraries have been included.
The project compiles and runs as expected, so at the end of the day, it is no big deal, it is just that having everything marked as an error makes it quite annoying.
I haven't been able to find anything on this bug. Just one vague reference in a blog. Has anyone else experienced it?
Obviously it isn't wide-spread, so there must be a setting/configuration that causes it. Does anyone know who to prevent this from happening?
EDIT:
No, these "errors" are solely in the IDE. The code compiles fine and runs. The developer has used "using namespace std;" so there should be no issues. It appears that the NetBeans IDE is buggy.
Sample code:
#include <stdlib.h>
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
string test;
test = "Why?";
cout << test << endl;
return (EXIT_SUCCESS);
}
This code compiles and prints out "Why?" but has "string", "cout" and "endl" marked as errors in the IDE. Explicitly using std:: makes no difference
Clean up Edit:
For anyone interested, a few days later I had 6 updates available for NetBeans. After installing this updates, the problem was rectified, despite the code not changing. So, apparently it was a NetBeans bug.