I created a new project in Visual Studio 2015 that consists of just one C++ file "test.cpp" that uses Eigen. I installed Eigen in the "C:\eigen" directory. When I tried to build the solution from within Visual Studio it failed because it couldn't find the Eigen header files, even though I added the "C:\eigen" directory to the include directories of the project. This was the error I got:
Cannot open include file: 'Eigen/Dense': No such file or directory
However when I opened the "Developer Command Prompt for VS2015", went to the directory containing the "test.cpp" file, and ran the command:
cl test.cpp -I "C:\eigen"
it succeeded. Why would the compilation fail from within Visual Studio but succeed from the command line?
Here is how I added the Eigen library to my Visual Studio Include Directories: