How can I install the Eigen library in Visual C++ 2010? I downloaded the library from eigen.tuxfamily
But I do not know how can install it on my Visual C++. I want to run a program I downloaded and it has the following:
#include <Eigen/Core>
using namespace Eigen;
How can I do this? I have tried to look online but I seem to get confused. Could someone explain to me how I can do it?
Install Visual C++ 2010 Express Edition & Install Microsoft Windows SDK for Windows Version 7.1 . When WindowsSDK is installed, Make sure to include Visual C++ Compilers as seen in the above picture Just unzip the latest version of the Eigen template library to the hard disk. Start Visual c++ 2010 Express and create a new Visual C++ Empty Project.
This is expected because Visual C++ environment still doesn’t know where the Eigen libraries, and this can be fixed very easily. Create 64bit "Solution platforms" for both " Debug " and " Release " "Solution Configurations".
Add Eigen library location to VC++ Include path. Once this step is done, VC++ editor should no longer highlight error in the sample code. Turn on Multiprocessor Compilation if you have a multicore processor. Enable SSE2 support. Once enabled Eigen will Make use of SSE2 to Vectorize it's code generation
Start Visual c++ 2010 Express and create a new Visual C++ Empty Project. Give a name for the new project. Add a new c++ source file to the project and copy-paste the code below.
Eigen is mostly header-only library. All that you need is to add Eigen path to (MSVC2010):
Project Properties -> C/C++ -> General -> Additional Include Directories
Let's say you have header Core in folder C:/folder1/folder2/Eigen/, i.e.:
C:/folder1/folder2/Eigen/Core
So you should add path C:/folder1/folder2 to Additional Include Directories.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With