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.
If user has netbeans installed on disk D: and he/she has folder D:/usr (actually "usr" folder at the same disk netbeans is installed) Parser Settings for C/C++ compilers are wrong: paths are started with /usr and all system header files are unresolved for all C/C++ projects. org.netbeans.modules.cnd.makeproject.api.compilers.GNUCCompiler and org.netbeans.modules.cnd.makeproject.api.compilers.GNUCCCompiler use the following code: if (platform.getId() == Platform.PLATFORM_WINDOWS) { if (new File("/usr/").exists()) // NOI18N includePrefix = ""; // NOI18N else if (new File("C:/cygwin").exists()) // NOI18N includePrefix = "C:/cygwin"; // NOI18N else if (new File("D:/cygwin").exists()) // NOI18N includePrefix = "D:/cygwin"; // NOI18N else if (new File("E:/cygwin").exists()) // NOI18N includePrefix = "E:/cygwin"; // NOI18N else if (new File("F:/cygwin").exists()) // NOI18N includePrefix = "F:/cygwin"; // NOI18N } the value of new File("/usr/").exists() is true in this particular case (you run java from the same disk usr folder created at). you can check with the simple test case that new File("/usr/").exists() will return true, but new File("/usr/").getCanonicalPath() will return "D:\usr" P.S. I have spend a half of day trying to understand what is wrong with my laptop and I had to debug C/C++ Dev Pack to understand the problem, I am not sure our users will spend so much time trying to make it work, that's why I have set priority to P2. The second reason I have set priority to P2 is the algorithm used to convert system include paths doesn't look correct and will be failed if we have non standard Cygwin installation for example.
Is this a new problem? The code you showed is not new code (ie, its been in makeproject since cnd 5.5 and isn't related to my recent commits). Anyway, I'll either fix it or hand off to Thomas. I've actually been considering doing a lookup in the Windows registry to find the default Cygwin install location. Perhaps now is the time to do that.
Fixed. Now using path from actual compiler. I'm not sure why the code used to check for /usr. I don't think it is necessary.