I created an empty 'Demo' project in Visual Studio 2008 and added some existing projects to my solution. Included "MyHeader.h" (other project's header) in main.cpp file which is in 'Demo'. Also added header files' path in "Tools/Option/VC++ Directories/Include files" section. But intellisense says: "File 'MyHeader.h' not found in current source file's directory or in build system paths..."
How the problem can be fixed? Thanks.
Here's how I solved this problem.
Done :)
If it is the case that only the IDE indicates that it cannot find included files, but compiling is successful, the issue is simply that IntelliSense is not fully up to date with recent changes. This can happen specifically when including existing projects, in my own experience. Deleting the .sdf file (= IntelliSense database) that is generated in your solution directory forces Visual Studio to regenerate it, so that it is up to date again. Just doing a "clean" will probably do the same thing, but takes more time since everything will be generated again then.
If the visual studio says that you miss some file in the current source file folder, there is one solution that i used. Just right click the file you want to add and choose
Open Document
, if it really doesn't exist, then you should see something likecannot find file in the source file path = "somewhere in your computer"
, then what you could do is the add your source file into that path first and see if it works.