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

Is Eigen incompatible with C++11?

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

Is Eigen incompatible with C++11?

Mon Mar 11, 2013 7:15 pm
Dear all,

Toolchain: VS++ 2010, Eigen 3.2.0 beta

Trying to compile very simple program fails:

Code: Select all
#include <Core>
#include <array> // Eigen's Array gets included instead of standard one!

int main(int argc, char* argv[])
{
   Eigen::MatrixXd C;
   std::array<int, 3> a1;
   return 0;
}


with the following output:

Error 2 error C2065: 'array' : undeclared identifier main.cpp 7
Error 3 error C2062: type 'int' unexpected main.cpp 7
Error 1 error C2039: 'array' : is not a member of 'std' main.cpp 7


The problem comes from the fact that Windows does not distinguish between upper and lower cases in file names. Therefore, Eigen's include "Array" gets included instead of a standard one.

Any idea how to overcome this problem?

Regards,
Alex
Indalo
Registered Member
Posts
2
Karma
0
Ok, solved :)

Since Eigen's <Array> is deprecated dummy header, simply removing it solved the problem.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
also, the standard and recommended way to include Eigen's header is to explicitly add the Eigen/ parent folder:

#include <Eigen/Core>

and so do not add path/to/eigen/Eigen in your include directories but only path/to/eigen.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]