c++ - 尝试编译 Eigen 时 Visual Studio 2013 崩溃

标签 c++ visual-studio-2013 crash eigen

以下简化代码:

#include "Eigen/Core"

template <int n>
Eigen::Matrix<float, 1, n> init_array(float a)
{
    Eigen::Matrix<float, 1, n> res;
    res.fill(a);
    return res;
}

int main()
{
    Eigen::Matrix<float, 1, 3> a = init_array<3>(1.0f);
}

导致 Visual Studio 崩溃:

main.cpp(13): fatal error C1001: An internal error has occurred in the compiler.
   (compiler file 'msc1.cpp', line 1325)
   To work around this problem, try simplifying or changing the program near the locations listed above.

我下载了最新版本的Eigen 3.2.5。 我有 Visual Studio Professional 2013 版本 12.0.21005.1。

有人知道解决方法吗?

最佳答案

我遇到了同样的问题。显然,您应该更新 Visual Studio 2013。这对我有用。 这个问题was reported to Microsoft他们在更新 2 中修复了它(当前是 5)

关于c++ - 尝试编译 Eigen 时 Visual Studio 2013 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31024371/

相关文章:

c++ - 指向常量数组的指针

c++ - 将 Qt 添加到现有的 Visual Studio 2013 C++ 项目

android - 启动android应用程序时出错(钛框架)

c - ,C, 尝试删除列表中的最后一个元素时崩溃

c++ - 重置条件变量(提升)

c++ - 派生类的聚合初始化

razor - 无 razor 语法着色/无法在 razor Visual Studio 2013 Preview 中设置断点

c++ - 动态工具提示 : TTN_GETDISPINFO not send when using LPSTR_TEXTCALLBACK

c++ - 抓双免并妥善处理

java - 使用c++模板生成JNI函数