Visual Studio express shows error : “internal error occured in compiler”

时光毁灭记忆、已成空白 提交于 2019-12-11 05:04:14

问题


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.


回答1:


In windows VS environment, you need to change the template specification. Change the template<> into template< Eigen::MatrixXd > will works



来源:https://stackoverflow.com/questions/24840094/visual-studio-express-shows-error-internal-error-occured-in-compiler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!