Airsim: Build instructions lead to #include error on Eigen/Dense

Created on 15 Feb 2017  路  10Comments  路  Source: microsoft/AirSim

Following build instructions from here gives me an error inside of VS2015 "cannot open source file "Eigen/Dense" AirLib c:\boost_1_63_0\AirSim\AirSim\AirLib\include\common\VectorMath.hpp 12

I have set EIGEN_HOME env variable, and manually added that to the project's "Include Directories" under the property panel, but no joy.

Most helpful comment

I had this issue on win 10 and UE4.18 . Inside AirSim\AirLib\deps there are two folders, eign-eign- and eign3. The latter was empty so I copied the contents of eign-eign- into eign3 and the compilation worked

All 10 comments

Ah, sorry about that, perhaps we need to fix the docs, the variable should be named EIGEN_ROOT.

Ah sorry my bad. I did call it EIGEN_ROOT, but have HOME on the brain for some reason. Still not working though.

So searching through the source, I don't seen any references to EIGEN_ROOT, within the source code. I am assuming that path should be referenced in the "Include Directores" right?

It will be in the make files, either cmake or .vcxproj. It looks for eigen3 folder inside EIGEN_ROOT, so if you removed that you may need to put that back, and you do not include eigen3 in the EIGEN_ROOT.

I had the same problem.

  • Cloned the project locally
  • Downloaded Eigen and Boost
  • Installed boost ( running the bat file)
  • Run the *.sln on Windows ( VS 2015), building it. - make sure you quit and restart VS for loading the environment variables.

Try to run the test "HelloDrone". The Boost environment variable has been found while building the project, the EIGEN_ROOT variable isn't.

Error: Error C1083 Cannot open include file: 'Eigen/Dense': No such file or directory AirLib e:\projects\airsim\airlib\include\common\vectormath.hpp 12

Here's what i found in the "Project Properties" of Airlib under C/C++ - Additional Include Directories:

include;$(EIGEN_ROOT)\Eigen3;$(BOOST_ROOT);deps\rpclib\include;..\MavLinkCom\include

The fix was that the EIGEN_ROOT should contain another folder named Eigen3. I moved all files of the directory in that folder and it was fixed :)

@jwusch does that fix your problem?

As long as you have environment variable EIGEN_ROOT that points to the root folder of Eigen library installation, you shouldn't have a problem. The root of Eigen library would should have child folder called eigen3.

I also tried to make the Eigen install instructions more clear, see install_eigen.md.

I ran into this issue today while setting up. I modified the docs for both Eigen and Boost to be clearer and created a PR: https://github.com/Microsoft/AirSim/pull/23

I had this issue on win 10 and UE4.18 . Inside AirSim\AirLib\deps there are two folders, eign-eign- and eign3. The latter was empty so I copied the contents of eign-eign- into eign3 and the compilation worked

when i meet this question, i try to open the script file 'build.cmd', according to the contents of this script file
IF NOT EXIST AirLib\depseigen3 (
powershell -command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip -OutFile eigen3.zip }"
powershell -command "& { Expand-Archive -Path eigen3.zip -DestinationPath AirLib\deps }"
powershell -command "& { Move-Item -Path AirLib\deps\eigen* -Destination AirLib\deps\del_eigen }"
We can know we should to download Eigen, then decompression the package in AirLib\deps\eigen,
this is fix my problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kim-BongSu picture Kim-BongSu  路  3Comments

ShukuiZhang picture ShukuiZhang  路  4Comments

p3jawors picture p3jawors  路  3Comments

HereIsPatrick picture HereIsPatrick  路  3Comments

Kim-BongSu picture Kim-BongSu  路  4Comments