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

compilation error

Tags: None
(comma "," separated)
wingsit
Registered Member
Posts
28
Karma
0
OS

compilation error

Fri Mar 26, 2010 9:51 pm
Compiling the following code on VC2008

Code: Select all
#include <Eigen/Core>
USING_PART_OF_NAMESPACE_EIGEN
Map<MatrixXd, Aligned> Mat2Eigen(int offset);


gives me
Code: Select all
error C2143: syntax error : missing ';' before '<'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int


Is there something obvious I have missed?

I am using latest public release version.
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: compilation error  Topic is solved

Sat Mar 27, 2010 5:30 am
2 problems here:

1) Map is not part of what USING_PART_OF_NAMESPACE_EIGEN provides. Actually, just forget about USING_PART_OF_NAMESPACE_EIGEN, just do: using namespace Eigen; It was kind of a mistake that we introduced it and it's going away in Eigen 3.0.

2) there is no Map constructor taking an int argument. Look at the documentation of class Map.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
wingsit
Registered Member
Posts
28
Karma
0
OS

Re: compilation error

Sat Mar 27, 2010 2:23 pm
bjacob wrote:2 problems here:
2) there is no Map constructor taking an int argument. Look at the documentation of class Map.


It was meant to be a fun declaration. After fixing the namespace, the problem is fixed. Thanks!


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]