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.

Bug 124360 - Netbeans6 "cannot find include file", but it compiles without errors
Summary: Netbeans6 "cannot find include file", but it compiles without errors
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-21 12:20 UTC by varox
Modified: 2008-04-07 14:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (48.81 KB, image/png)
2007-12-22 17:08 UTC, soldatov
Details
gcc -x c -v -E /dev/null (1.41 KB, text/plain)
2007-12-22 17:59 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description varox 2007-12-21 12:20:18 UTC
Netbeans6: "cannot find include file", but it compiles without errors. Why does Netbeans underlines my includes with a
red line, even if it finds them while compiling?
Comment 1 Alexander Pepin 2007-12-21 13:22:06 UTC
In fact error highlighting has nothing to do with a compilation process so it uses another mechanism. This error means
that while parsing your project this include file was not found. Could you please provide some additional information
about your project, what your project structure is and what type of the project you use, managed or makefile-based (I
guess it's makefile-based one). It would be great if you could provide the part of your project where this error happens. 
Comment 2 varox 2007-12-21 20:23:50 UTC
The project I created was just a simple Hello world programm for testing purposes.
All I did was:

New Project -> C/C++ Application -> Finish (I didn't even change the name of the project)
Right klick on the project -> New -> Main ++ File

#include <stdlib.h>
#include <iostream.h>

int main(int argc, char** argv) {
    printf("Hello world!\n");
    return (EXIT_SUCCESS);
}
Comment 3 varox 2007-12-21 20:35:36 UTC
I forgot to metion that this problem exists on Windows XP only, on Linux it's working just fine!
Comment 4 soldatov 2007-12-22 17:07:27 UTC
confirmed. I have same problem in Mandriva 2008.
Scenario:
- Push Tools|Options
- Select C/C++ -> Code Assistance
==> Include directive field is empty
Comment 5 soldatov 2007-12-22 17:08:35 UTC
Created attachment 54465 [details]
Screenshot
Comment 6 soldatov 2007-12-22 17:57:58 UTC
It is P1 for me. IDE cannot find predefined include paths if I am using the localized gcc.

varoxxx,
can you run 'gcc -x c -v -E nul' command in terminal on Windows XP?
Comment 7 soldatov 2007-12-22 17:59:34 UTC
Created attachment 54466 [details]
gcc -x c -v -E /dev/null
Comment 8 varox 2007-12-23 02:18:39 UTC
Hey Soldatov,

I have windows installed on my work-notebook only, so I can paste the output in about 3 weeks. Sorry about that
Comment 9 Vladimir Kvashin 2007-12-24 12:24:34 UTC
As I understand the reason is that the compiler you use has localized messages.
That's why its output is parsed incorrectly.
I believe we'll have the same issue with any compiler that has localized messages.
Comment 10 varox 2007-12-24 12:39:45 UTC
The compiler I am using is gcc of cygwin the newest version (I can't be more exact)

Merry Christmas!
Comment 11 Vladimir Kvashin 2008-01-11 14:15:20 UTC
Fixed:

Checking in GNUCorCCCompiler.java;
/shared/data/ccvs/repository/cnd/makeproject/src/org/netbeans/modules/cnd/makeproject/api/compilers/GNUCorCCCompiler.java,v
 <--  GNUCorCCCompiler.java
initial revision: 1.1
done
Checking in GNUCCCompiler.java;
/shared/data/ccvs/repository/cnd/makeproject/src/org/netbeans/modules/cnd/makeproject/api/compilers/GNUCCCompiler.java,v
 <--  GNUCCCompiler.java
new revision: 1.22; previous revision: 1.21
done
Checking in GNUCCompiler.java;
/shared/data/ccvs/repository/cnd/makeproject/src/org/netbeans/modules/cnd/makeproject/api/compilers/GNUCCompiler.java,v
 <--  GNUCCompiler.java
new revision: 1.22; previous revision: 1.21
done
Comment 12 soldatov 2008-01-15 17:31:38 UTC
works wrong on my computer at home
Comment 13 Vladimir Kvashin 2008-01-16 11:59:03 UTC
Fixed.

Checking in GNUCCCCompiler.java;
/shared/data/ccvs/repository/cnd/makeproject/src/org/netbeans/modules/cnd/makeproject/api/compilers/GNUCCCCompiler.java,v
 <--  GNUCCCCompiler.java
new revision: 1.2; previous revision: 1.1
done
Comment 14 soldatov 2008-04-07 14:27:06 UTC
fixed many time ago.
verified in NetBeans 6.1.