Can't figure out if it's circular addiction or clang

I am on Clang / OS X Yosemite and my project used Eigen fine. Then I introduced an external library that also uses Eigen, and now I have this compilation error:

/usr/local/include/Eigen3/Eigen/src/Geometry/Quaternion.h:516:13: Implicit instantiation of undefined template 'Eigen::internal::quaternionbase_assign_impl<Eigen::Matrix<double, 3, 1, 0, 3, 1>, 3, 1>'

This is like an ad in a library:

#include <Eigen/Eigen>

And this is the code in which I use Quaternion:

Eigen::Quaternion<double> q, q_wv, q_ic, q_cv;
q_cv = _poseHandler->GetAttitudeMeasurement();  // problem here

First of all, since this includes accounting for Core and Geometry, I don’t think this header is missing. Then I don’t understand the "undefined" error, because the internal template is declared in the same header if you look into it. Therefore, my question remains: what is wrong?

UPDATE:

, import include, . , <Eigen/Core> , , , <Eigen/Geometry>.

+4
1

, , , , , . , quaternionbase_assign_impl 3X1. ( , - .) :

template<typename Other,
         int OtherRows=Other::RowsAtCompileTime,
         int OtherCols=Other::ColsAtCompileTime>
struct quaternionbase_assign_impl;

:

template<typename Other>
struct quaternionbase_assign_impl<Other,3,3> { ... };

template<typename Other>
struct quaternionbase_assign_impl<Other,4,1> { ... };

"" . ,

Eigen::internal::quaternionbase_assign_impl<Eigen::Matrix<double, 3, 1, 0, 3, 1>, 3, 1>

. , 3X1 forward, . , , 3X1 quaternionbase_assign_impl.

+2

All Articles