I seem to fail to understand how VS 2015 handles include paths. I have put the folders I need VS to scan for included files in the following places in the "Properties" pane of my project :
Configuration Properties > VC++ Directories > Include Directories
Configuration Properties > C/C++ > General > Additional Include Directories
But when I ask for a build I get :
fatal error C1083: Cannot open include file: 'xyz.h': No such file or directory
The spelling has been double-checked. I tried it with a dummy project which I can send, same behavior. I have tried with both slash and anti-slash. Actually some folders are subfolders of the project folders and do not require any slash or anti-slash in their path description (simply the folder name). Those also fail to be scanned and their contents remains unfound by the compiler.
I also tried specifying the path manually in the include directive, this works.
I also opened a project where everything is working and I added a new include directive to a newly created file in a folder which I added to the include path. This project now fails to compile.
Better yet, still using that old project that was compiling fine, if I remove one (or even all) folders from the Additional Include Directories filed in C/C++ > General it still compiles ! So this must be the wrong place to specify include dirs !
What do I not know here ? Thanks in advance !
Solved.
In Visual Studio you can have multiple configurations (e.g. Debug or Release) and target platform (e.g. x86 or x64).
All properties (like include paths) also have a variant for each combination of configuration and platform.
When editing properties you only edit those properties for the combination of configuration and platform you set at the top.
That means I was editing the include paths for one configuration/platform combination and compiling for another.
This is terrible design, but alright. At least there is a possibility to specify that you want to edit properties for all configurations and all platforms (last option in the respective drop-down menu for configurations and for platforms).