Reputation: 61
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.
Upvotes: 5
Views: 5092
Reputation: 61
Looks like I had same "bug" as mentioned in this post here:
Visual Studio does not honor include directories
After having changed the Additional Include Directories for all platforms instead, the code was compiled without any errors.
Upvotes: 1
Reputation: 75
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
Upvotes: 2