I'm trying to use Eigen in my C++ program but this error appears (paths are simplified).
Starting build...
"C:\Program Files\(...)\g++.exe" -g D:\(...)\main.cpp -o D:\(...)\main.exe
D:\(...)\main.cpp:2:10: fatal error: Eigen/Dense: No such file or directory
#include <Eigen/Dense>
^~~~~~~~~~~~~
I included Eigen directory in .vscode/c_cpp_properties.json
.
The Eigen
folder with Dense
file - and others - inside is listed in my Explorer sidebar, under the project I want to use it in.
This is my c_cpp_properties.json
:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${default}",
"D:\\programming\\_lib\\cpp\\eigen-3.3.9\\"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/g++.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
It seems that Eigen include is not used in the compiler command. Is that right? If so do I include it manually via "Compiler arguments" or "Compile commands" setting or do something else?