This forum has been archived. All content is frozen. Please use KDE Discuss instead.

MSVC 2010 and eigen

Tags: None
(comma "," separated)
genetica
Registered Member
Posts
2
Karma
0

MSVC 2010 and eigen

Tue Mar 01, 2011 5:40 pm
Good day

I am quite new to programming and is trying to get Eigen to work
on Microsoft visual studio 2010.

I created a Win32 Application Console,
Properties->General->Character set->not set
added c:\eigen to VC++ Directories -> Include Directories,
added #include "Eigen/Core"

Program:
#include "stdafx.h"
#include "Eigen/Core"

int _tmain(int argc, _TCHAR* argv[])
{
Matrix3f a;
a << 1,2,3,4,5,6,7,8,9;
return 0;
}

then when compiling I receive error : Matrix3f undeclared identifier.

What am I doing wrong, can someone please help?

O, I extracted the new eigen so that c:\eigen\Eigen\Core
jitseniesen
Registered Member
Posts
204
Karma
2

Re: MSVC 2010 and eigen

Tue Mar 01, 2011 5:47 pm
Matrix3f (and similar type identifiers) are declared in the Eigen namespace, so you have to add either "using Eigen::Matrix3f;" or "using namespace Eigen;" to your program.

Have a look at the example programs on http://eigen.tuxfamily.org/dox-devel/Ge ... arted.html .
genetica
Registered Member
Posts
2
Karma
0

Re: MSVC 2010 and eigen

Wed Mar 02, 2011 7:21 am
Thank you, I feel like an idiot now...


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora