c++ - Eigen compile errors: no matching function for call to -
i trying use eigen 3.2.2 in qt5 project being compiled on win32 vista machine. code uses eigen library compiles fine on osx computer when setup simple c++ project. following 2 errors when add qt project on windows machine:
<projectdir>\3rdparty\eigen-3.2.2\eigen\src\core\util\blasutil.h:198: error: no matching function call 'eigen::internal::blas_traits<eigen::cwiseunaryop<eigen::internal::scalar_multiple_op<float>, const eigen::returnbyvalue<eigen::internal::inverse_impl<eigen::block<eigen::matrix<float, 4, 4>, -1, -1, false> > > > >::extract(const type&)' static inline extracttype extract(const xprtype& x) { return base::extract(x.nestedexpression()); } ^ <projectdir>\3rdparty\eigen-3.2.2\eigen\src\core\util\blasutil.h:198: candidate is: <projectdir>\3rdparty\eigen-3.2.2\eigen\src\core\util\blasutil.h:169: static const xprtype& eigen::internal::blas_traits<xprtype>::extract(const xprtype&) [with xprtype = eigen::returnbyvalue<eigen::internal::inverse_impl<eigen::block<eigen::matrix<float, 4, 4>, -1, -1, false> > >; eigen::internal::blas_traits<xprtype>::extracttype = const eigen::returnbyvalue<eigen::internal::inverse_impl<eigen::block<eigen::matrix<float, 4, 4>, -1, -1, false> > >&] static inline extracttype extract(const xprtype& x) { return x; } ^ <projectdir>\3rdparty\eigen-3.2.2\eigen\src\core\util\blasutil.h:169: note: no known conversion argument 1 'const type {aka const eigen::matrix<float, -1, -1, 0, 4, 4>}' 'const eigen::returnbyvalue<eigen::internal::inverse_impl<eigen::block<eigen::matrix<float, 4, 4>, -1, -1, false> > >&'
<projectdir>\3rdparty\eigen-3.2.2\eigen\src\core\util\blasutil.h:200: error: no matching function call 'eigen::internal::blas_traits<eigen::cwiseunaryop<eigen::internal::scalar_multiple_op<float>, const eigen::returnbyvalue<eigen::internal::inverse_impl<eigen::block<eigen::matrix<float, 4, 4>, -1, -1, false> > > > >::extractscalarfactor(const type&)' { return x.functor().m_other * base::extractscalarfactor(x.nestedexpression()); } ^ <projectdir>\3rdparty\eigen-3.2.2\eigen\src\core\util\blasutil.h:200: candidate is: <projectdir>\3rdparty\eigen-3.2.2\eigen\src\core\util\blasutil.h:170: static const scalar eigen::internal::blas_traits<xprtype>::extractscalarfactor(const xprtype&) [with xprtype = eigen::returnbyvalue<eigen::internal::inverse_impl<eigen::block<eigen::matrix<float, 4, 4>, -1, -1, false> > >; eigen::internal::blas_traits<xprtype>::scalar = float] static inline const scalar extractscalarfactor(const xprtype&) { return scalar(1); } ^ <projectdir>\3rdparty\eigen-3.2.2\eigen\src\core\util\blasutil.h:170: note: no known conversion argument 1 'const type {aka const eigen::matrix<float, -1, -1, 0, 4, 4>}' 'const eigen::returnbyvalue<eigen::internal::inverse_impl<eigen::block<eigen::matrix<float, 4, 4>, -1, -1, false> > >&'
the errors point lines marked below in eigen\src\core\util\blasutil.h:
// pop scalar multiple template<typename scalar, typename nestedxpr> struct blas_traits<cwiseunaryop<scalar_multiple_op<scalar>, nestedxpr> > : blas_traits<nestedxpr> { typedef blas_traits<nestedxpr> base; typedef cwiseunaryop<scalar_multiple_op<scalar>, nestedxpr> xprtype; typedef typename base::extracttype extracttype; // error 1 on following line static inline extracttype extract(const xprtype& x) { return base::extract(x.nestedexpression()); } static inline scalar extractscalarfactor(const xprtype& x) // error 2 on following line { return x.functor().m_other * base::extractscalarfactor(x.nestedexpression()); } };
what cause these errors? i'm new c++ , more qt , qt creator may have missed basic. if case please point me in right direction , i'll start digging. thanks!
edit:
lines seem trigger errors looks this:
eigen::matrix4f mat1; eigen::matrix<float, 3, 1> mat2, result; // fill , work matrices... result = -1.0 * mat1.topleftcorner(3, 3).transpose() * mat2 // problem line
Comments
Post a Comment