I have set up
libeigen3-dev
in purchase to compile programs using Eigen 3. when I include a file, such asEigen/Dense
I obtain this error when I consider to operateg
:What is the most reliable package for c which calculates eigen vectors? Is Eigen a good package? Computing in Mathematics. Join ResearchGate to find the people and research you need to.
Running the adhering to line functions good:
g -I /usr/include/eigen3/ src/major.cpp -MMD -std=c11
shouldn'testosterone levels that include directory site be automatically found by GCC because I installed the Eigen package through skills? Why are usually boost and OpenGL discovered immediately when I install the libraries but not really Eigen? (Note that eigen can be a header-only library, but that shouldn't matter best?)
Working
g src/major.cpp -MMD -std=c11 -verbose
generates the using result:quant
quantquant6,8351818 yellow metal badges7272 metallic badges143143 bronze badges
6 Solutions
Operate your compiler with the
-verbose
change:If your includes are essential contraindications to one of the pathways proven in this output, you don't possess to make use of
-I
. It depends how gcc has been configured, and it is dependent where that additional stuff is usually installed.Notice that
.
will be typically not really in the -We pathways.Later on
After swapping a few of comments it is certainly very clear that
/usr/consist of/eigen3/Eigen/Dense
should be include-able by#include lt;Eigen/Densegt;
, but not really by#include lt;eigen3/Eigen/Densegt;
. As a result, the addition of the control line choice-I /usr/consist of/eigen3
is usually mandatory.Whether some installation selects to set up header documents into a website directory that in one of the ones compiled into gcc, depends on the default, a choice produced by the distributor, or a choice produced during set up. I'n say that 'often used' header documents (Increase) are usually well placed into /usr/regional/include while some 'elitist' stuff would end up being better off in a listing of its personal.
launelaune28.5k33 silver badges2020 sterling silver badges3131 bronze badges
I got this exact same issue on my Ubuntu 14 box. Ended up producing symlinks to obtain around it. With eigen3 set up in /usr/nearby/include do the following:
You should right now be able to include the headers by:
kbrownkbrown
raksiraksi
Yuchen ZhongYuchen Zhong13.3k88 magic badges101101 silver badges139139 bronze badges
This worked for me (using Macports for installing Shogun on Macintosh OS 10.11):
scottlittlescottlittle6,63533 yellow metal badges2828 silver precious metal badges5151 bronze badges
If you follow the getting started instructions at the main Eigen site then you can't move far wrong.
To surmise, download then get the Eigen supply code into a index of selection. Next copy the 'Eigen' index into
/usr/local/include/
. Take note this can be the listing called 'Eigen' WITHIN the website directory structure taken out, NOT the whole directory construction itself. It proved helpful for me on an Ubuntu 14.04 virtual machine.badPhysicistbadPhysicist