| View previous topic :: View next topic |
| Author |
Message |
derari
Joined: 21 Dec 2011 Posts: 1
|
Posted: Wed Dec 21, 2011 10:52 am Post subject: includes in header files not found |
|
|
Hello,
I have a Maven project with some C/C++ files, everything works so far except for Netbeans' auto correction.
A simple #include <windows.h> does not work in .h files, the same goes for files that have to be found via Options>C>Code Assistance. The errors says
| Quote: | Cannot find include file <windows.h>
For extra info hold Ctrl and move mouse over include directive
----
(Alt-Enter shows hints) |
Alt-Enter shows the same message, Ctrl shows
| Quote: | | Unresolved directive #include <windows.h> |
Including the same files in .c or .cpp files works fine.
What could be causing this?
Regards,
Arian
|
|
| Back to top |
|
 |
Vladimir Voskresensky - O Posted via mailing list.
|
Posted: Wed Dec 21, 2011 4:15 pm Post subject: includes in header files not found |
|
|
After inclusion into cpp file, please, Alt-Enter to see searched paths.
Probably your header is not included into any other source files? => then it's
orphan header which doesn't have compile context.
Orphan headers use include paths settings from project level from C++ compiler.
Thanks,
Vladimir.
On 21.12.11 14:52, derari wrote:
| Quote: | Hello,
I have a Maven project with some C/C++ files, everything works so far except for Netbeans' auto correction.
A simple #include<windows.h> does not work in .h files, the same goes for files that have to be found via Options>C>Code Assistance. The errors says
| Quote: | Cannot find include file<windows.h>
For extra info hold Ctrl and move mouse over include directive
----
(Alt-Enter shows hints)
|
Alt-Enter shows the same message, Ctrl shows
| Quote: | Unresolved directive #include<windows.h>
|
Including the same files in .c or .cpp files works fine.
What could be causing this?
Regards,
Arian
|
|
|
| Back to top |
|
 |
speedogoo
Joined: 23 Dec 2011 Posts: 2
|
Posted: Fri Dec 23, 2011 10:30 am Post subject: |
|
|
But even if it's not included in any C/C++ project, it should be able to find include path from the global setting in Options | C/C++ | Code Assistance?
However, here even stdio.h cannot be recognized.
| Description: |
|
| Filesize: |
28.51 KB |
| Viewed: |
4228 Time(s) |

|
|
|
| Back to top |
|
 |
Vladimir Voskresensky - O Posted via mailing list.
|
Posted: Fri Dec 23, 2011 10:36 am Post subject: includes in header files not found |
|
|
On 23.12.11 14:30, speedogoo wrote:
| Quote: | But even if it's not included in any C/C++ project, it should be able to find include path from the global setting in Options | C/C++ | Code Assistance?
However, here even stdio.h cannot be recognized.
| I agree.
Could you, please, file a bug that in orphan headers standard system includes
are broken.
Thanks!
Vladimir.
|
|
| Back to top |
|
 |
speedogoo
Joined: 23 Dec 2011 Posts: 2
|
|
| Back to top |
|
 |
Vladimir Voskresensky - O Posted via mailing list.
|
Posted: Fri Dec 23, 2011 11:37 am Post subject: includes in header files not found |
|
|
Thanks!
On 23.12.11 14:43, speedogoo wrote:
|
|
| Back to top |
|
 |
kevstev01
Joined: 11 Sep 2012 Posts: 1
|
Posted: Tue Sep 11, 2012 9:46 am Post subject: Relative paths |
|
|
posted here in error - moved to bug report
I have found that using C/C++ -> Project Options -> File Path Mode ->Always Relative (the default) requires that the MinGW\include path is added to the project Code Assistance->C Compiler->Include Directories as a relative path to enable the editor to 'see' standard system includes. (running NB7.2 on Windows 7) even though the non-relative path is included in the NB default include paths, and the 'CTRL + mouse over' search path hints show the directory is being searched when it is not.
|
|
| Back to top |
|
 |
|