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.
Example: newfile.h: #include "newfile1.h" struct S { int i; int j; }; newfile1.h: #ifdef MACRO1 struct S { int i; }; #endif newfile.cpp: #include "newfile.h" int main() { S s; // S links to S from newfile1.h s.j; // unresolved j return 0; } newfile1.cpp: #define MACRO1 #include "newfile1.h" newfile1.h is included two times from newfile.cpp (from newfile.h) and newfile1.cpp. To newfile.cpp it's included without defines. To newfile1.cpp it's included with MACRO1. So #ifdef block in newfile1.cpp is active. And newfile.cpp gets declaration of S from newfile1.cpp instead of newfile.cpp. Situation is reproducible, but it depends on file parsing sequence.
*** This bug has been marked as a duplicate of bug 194769 ***