# fatal error C1083: Cannot open include file:

This is a discussion on fatal error C1083: Cannot open include file: within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I am running about 27 projects successfully in Visual Studio 2003. When I try to do add a new ...

1. ## fatal error C1083: Cannot open include file:

Hi,

I am running about 27 projects successfully in Visual Studio 2003.
When I try to do add a new project having the same header files(with same Location) and Project Properties, it gives an error <fatal error C1083: Cannot open include file:>.

i.e. if xyz.h is header file for another working projects then it should also work for new project, isn't it ?

I need to use Visual Studio 2003 Only.

Thanks & Regards,
-Yogesh.

2. #include "xyz.h" will only look in the current directory for the header file.
#include <xyz.h> will look inside include paths for the file.
If the file is in another project, chances are it's not in the same directory, so you need to specify a more specialized path such as #include "..\my_other_project\xyz.h".

3. Originally Posted by Elysia
#include "xyz.h" will only look in the current directory for the header file.
#include <xyz.h> will look inside include paths for the file.
If the file is in another project, chances are it's not in the same directory, so you need to specify a more specialized path such as #include "..\my_other_project\xyz.h".
I don't think that's true. "xyz.h" will FIRST look in the current directory, then in the include-path. <xyz.h> will ONLY look in your include path, not in the current directory.

--
Mats

4. Hi,

I do have relative path for header files and mentioned it in the Additional Dependencies in project properties properly.

5. Originally Posted by bodhankaryogesh
Hi,

I do have relative path for header files and mentioned it in the Additional Dependencies in project properties properly.
If the project can't find the file, then it's obviously not where the system is searching for it. I can assure you that the compiler is capable of finding the file, as long you specify the path correctly.

--
Mats

6. Well, the names of the files makes no difference. So long as you specify the correct path, it should work. If it can't open the file, then... make sure the path is correct. Try using an absolute path. Make sure you have proper file permissions.

7. Hi ELysia,

I make sure that the path is correctly given and also tried with absolute path.

8. Are there spaces in your pathname?

--
Mats

9. And if it is searching the same for another project then why not for mine one ?

10. No there are no spaces.
Here is the example of working project "..\..\..\plugin\common\map\rvp;..\..\..\tools\Dco mpNtfs"
The same i copied into my new project (Also tried with typing the same path and with Absolute path)

11. Just ignore the previous path
Actually the path is "..\..\..\plugin\common\map\rvp;..\..\..\tools\Dco mpNtfs"

12. Originally Posted by bodhankaryogesh
No there are no spaces.
Here is the example of working project "..\..\..\plugin\common\map\rvp;..\..\..\tools\Dco mpNtfs"
The same i copied into my new project (Also tried with typing the same path and with Absolute path)
Strange. When I look in the quoted text when editing, the "DcompNtfs" looks right, but there's a space in the preview [and in your post]. This is probably some invisible character, so perhaps this is the cause of problems...

--
Mats

13. It is "DecompNtfs" . No space in between .

14. May be, but i am including the first header file from "..\..\..\include\common".
From here also it is giving error.

15. It could probably be that you haven't set your include path correctly and the files you are including try to include more files which they expect to be in the include path directory, which is not set.