getting problem to use eigen in vscode #12349
Rick-Bhattacharya
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
so, i am using windows 10 and mingw compiler and i want to use the eigen librery but getting some problems
here is the location where eigen is stored C:\toolbox\eigen-3.4.0
and here is how the cpp_properties.json looks
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${default}",
"${workspaceFolder}/**",
"C:/toolbox/eigen-3.4.0"
}
and here is how the launch.json looks
{
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"command": "g++",
"args": [
"-g",
"${file}",
"-I${workspaceFolder}/include",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-I",
"C:/toolbox/eigen-3.4.0"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": []
}
],
"configurations": [
}
so when i am including the directory, there is no error even it is recognizing the functions in the librery.
here is an example code:
#include<bits/stdc++.h>
#include<Eigen/Dense>
using namespace std;
using namespace Eigen;
int main(){
Matrix<float ,3,3> matA;
matA.setZero();
cout<<matA<<endl;
cout<<"hello ";
}$?) { g++ testEigen.cc -o testEigen } ; if ($ ?) { .\testEigen }
but when i run the code it is showing error:
PS E:\C++> cd "e:\C++" ; if (
testEigen.cc:2:22: fatal error: Eigen/Dense: No such file or directory
#include<Eigen/Dense>
^
compilation terminated
how an i fix that ?
Beta Was this translation helpful? Give feedback.
All reactions