Visual Studio Express显示错误:“在编译器中发生内部错误”。 [英] Visual Studio express shows error : "internal error occured in compiler"
问题描述
我使用cmake为c ++库g2o创建了Visual Studio文件。但是,当我尝试构建它时,它无法在某些模板定义中显示错误。
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());
}
由于我不是c ++专家,所以我不确定会发生什么这行代码有误。我尝试注释此代码并构建。然后,在下一个模板定义上构建失败。 Visual Studio有问题吗?
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?
显示的错误是
同一代码在linux上运行良好。但是我需要在Windows机器上运行它,因为调试起来更容易,而且对Linux机器的访问权限很有限。任何帮助将不胜感激。
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.
推荐答案
在Windows VS环境中,您需要更改模板规范。
将 template<>
更改为 template< Eigen :: MatrixXd>
将起作用
In windows VS environment, you need to change the template specification.
Change the template<>
into template< Eigen::MatrixXd >
will works
这篇关于Visual Studio Express显示错误:“在编译器中发生内部错误”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!