Fatal error C1083: Cannot open include file

I looked at a previous post based on this, but they are not related. I get the following error.

1>c:\users\numerical25\desktop\intro todirectx\introtodirectx\chapter 4\init direct3d\init direct3d.cpp(9) : fatal error C1083: Cannot open include file: 'd3dApp.h': No such file or directory 

But it is clear from the image shown below, its there

alt text

In confrontation with other people who have problems finding a title on a physical disk. the compiler cannot find my title inside the solution explorer.

+7
include visual-c ++ projects-and-solutions
source share
3 answers

What you see in the left panel of the IDE has absolutely nothing to do with whether the file is there or not. Solution Explorer does not examine the actual files present in the file system; it simply shows you which files are registered as part of this solution.

To compile the code, the file must be present in the file system of your computer in one of the paths specified as search paths for the header files of this solution. He is not, therefore, a mistake.

+14
source share

Make sure that the directory in which the header is included is included in the project settings (C / C ++ β†’ General and RAR; Additional Include Directories).

+5
source share

Solving and viewing files is sometimes irrelevant; each file that you add to the solution view is an entry in an XML file. The #include directive usually looks at the location of the physical disk, looking at the inclusion paths.

My suggestion is to add the direct3d.h include path to the project settings. This is recommended as it makes it easy to upgrade to new versions of the SDK (and this is good practice for any external libraries).

0
source share

All Articles