0
我在编译我的代码时遇到了一些问题。有几个函数由于错误C2719而无法编译 - 具有__declspec(align('16'))的形式参数将不会对齐。头文件错误C2719 - 不使用stl:vector
功能,这VisualStudio中不能编译看起来像
Eigen::Matrix2d AlgorithmBase::ReverseTransform(Eigen::Vector2d point, Eigen::Vector2d *translation, Eigen::Matrix2d *scaling, double phi, Eigen::Matrix2d *share)
{
Eigen::Matrix2d reversedScaling;
reversedScaling(0,0) = 1/(*scaling)(0,0);
reversedScaling(0,1) = reversedScaling(1,0) = 0;
reversedScaling(1,1) = 1/(*scaling)(1,1);
Eigen::MatrixXd newTranslation = -1**translation;
return MatrixHelper::CreateRotationMatrix(-phi)* *scaling*point + newTranslation;
}
void TemplateClusterBase::SetScalingMatrix(Eigen::Matrix2d matrix)
{
if(matrix.rows() == 1 || matrix.cols()==1)
{
this->scalingMatrix = MatrixHelper::CreateScalingMatrix(matrix(0,0));
}
else
{
this->scalingMatrix = matrix;
}
}
这很奇怪,因为以前我用MatrixXd代替的Vector2D和Matrix2d一切都还顺利的事实。更多这是使用stl:vector时的常见问题 - 然而正如你可以看到这个函数不作为参数stl:vector。
我能做些什么来解决这个问题?
什么'std :: vector'与什么有关? – 2011-06-01 22:04:37
在研究如何解决这个问题的过程中,我发现这是使用stl:vector时的常见错误 - 至少我认为:) – george 2011-06-01 22:13:45
Eigen版本2或3? – genpfault 2011-06-01 22:24:47