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

Error building Eigen 3.2.8 with XCode 7.3.1

Tags: None
(comma "," separated)
koent
Registered Member
Posts
2
Karma
0
In one of my projects, I recently upgraded Eigen to v. 3.2.8, and when building in XCode 7.3.1, I now get several errors like these: ...../Eigen/eigen/Eigen/src/Core/DenseStorage.h:277:21: No member named 'move' in namespace 'std'; did you mean 'modf'?

Do I need a specific compiler version to build in XCode?
I also noticed there is a preprocessor definition EIGEN_HAVE_RVALUE_REFERENCES that is #ifdef'd upon. A C++ 11 move semantics thing I guess?
Does Eigen build without C++ 11 support? Should I undefine that macro somewhere?
And does this have relevant speed implications?

Koen
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I've xcode 7.3.0 but cannot reproduce. Could you paste your compiler flags? In particular does it includes -std=c++11? Finally, what if you add:

#include <utility>

before including any Eigen's header?
koent
Registered Member
Posts
2
Karma
0
Thanks for the fast follow-up!

Under the Apple LLVM 7.1 - Language - C++ settings, the C++ Language Dialect was set to C++11 [-std=c++11] .
However, C++ Standard Library was set to Compiler Default, which appears to be libstdc++ (GNU C++ standard library).
When I changed this to libc++ (LLVM C++ standard library with C++ 11 support), the errors went away and the Eigen code built just fine.

Also, if I changed C++ Language Dialect to -std=gnu++98, and C++ standard library to libstdc++, the errors also disappear.

So it was just a configuration issue in my Xcode project and all is fine with Eigen!

Koen
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Indeed, libstdc++ does not support c++11


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]