I created visual studio files for the c++ library g2o using cmake. But when I try to build it, it is failing showing an error at some template definitions.
template<>
inline void axpy(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
{
y.segment(yoff, A.rows()) += A * x.segment(xoff, A.cols());
}
As I am not an expert in c++, I am not sure what is going wrong in this line of code. I tried commenting this code and building. Then the build fails on the next template definition. Is it an issue with visual studio?
The error shown is
The same code is working perfectly on linux. But I need to run it on my windows machine as debugging is easier and I have only limited access to the linux machine. Any help will be appreciated.
In windows VS environment, you need to change the template specification. Change the
template<>
intotemplate< Eigen::MatrixXd >
will works