使用mlpack时引发Armadillo异常

问题描述

我正在使用运行在Armadillo线性代数库顶部的mlpack库。引用debug.hpp文件中的行已引发异常,如下所示:

//! if state is true,abort program
template<typename T1>
arma_hot
inline
void
arma_check(const bool state,const T1& x)
  {
  if(state)  { arma_stop_logic_error(arma_str::str_wrapper(x)); }
  }

显示以下消息: Exception thrown at 0x00007FFFEEC912DE (vcruntime140.dll) in tutorial.exe: 0xC0000005: Access violation reading location 0x0000019B35203060.

关于如何阅读此错误消息的任何建议以及对此我该怎么办?谢谢。

解决方法

如果没有,请尝试安装Visual Studio 2015的x64和x86可重新分发。

如果仍然无法正常工作,请检查编译设置:您需要使用/MT标志进行静态编译还是需要使用/MD标志进行动态编译。

此标志在Project properties/ C/C++ / Code generation下。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...