Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Additional include directory in Visual studio 2015 doesn't work

I was trying to re-use an available source code for my own project, it can be found here:
https://github.com/TadasBaltrusaitis/OpenFace
I tried compiling project FeatureExtraction of the original code, everything was fine. Then I created a new empty project and added the following #include:

#include "LandmarkCoreIncludes.h"

#include <Face_utils.h>
#include <FaceAnalyser.h>
#include <GazeEstimation.h>  

These are exactly the same as in project FeatureExtraction in the provided source code. I've already changed the additional include directories in C/C++ general tab into:

$(SolutionDir)\lib\local\FaceAnalyser\include  
$(SolutionDir)\lib\local\LandmarkDetector\include  

However, it still gave me "cannot open source file error".
Update: If I put the absolute path of the header file directly to the code it is OK, however if I put the absolute path to the Additional Include Directories, the error remained.

like image 339
pyroshawn Avatar asked Oct 18 '22 12:10

pyroshawn


1 Answers

Use #include "header.h" instead of the one with diamonds (< and >) which looks in another directory.

After that, check if the header files really are in these directories. If they are, you should check the $(SolutionDir) ( I don't use a '\' after the $(SolutionDir) but it may work out as well).

Try to locate and delete the .suo file and restart VS

like image 90
John.A.Myer Avatar answered Oct 21 '22 03:10

John.A.Myer