Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing the Eigen library in Visual C++ 2010

Tags:

c++

eigen

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?

like image 950
crystalclear Avatar asked Apr 05 '13 19:04

crystalclear


People also ask

How to install Eigen Template Library in Visual C++ 2010 Express?

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.

Why Visual Studio C++ doesn't recognize Eigen libraries?

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".

How to enable SSE2 support for Eigen in VC++?

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

How to create an empty project in Visual C++ 2010 Express?

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.


1 Answers

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.

like image 179
Evgeny Panasyuk Avatar answered Sep 28 '22 11:09

Evgeny Panasyuk