Matlab使用 ‘MinGW64 Compiler (C++)‘ 编译。错误‘fabs‘ was not declared in this scope 解决办法

MOTChallengeEvalKit 评估工具运行,运行MOT评估工具的方法在下面这篇文章中,
点击这里
但是matlab安装’MinGW64编译器后会出现’fabs’ was not declared in this scope的问题。导致这里不能完成。
Matlab使用 ‘MinGW64 Compiler (C++)‘ 编译。错误‘fabs‘ was not declared in this scope 解决办法_第1张图片

原因是MinCostMatching.cpp文件中没有加math.h这个头文件
Matlab使用 ‘MinGW64 Compiler (C++)‘ 编译。错误‘fabs‘ was not declared in this scope 解决办法_第2张图片

加入下面的头文件即可
Matlab使用 ‘MinGW64 Compiler (C++)‘ 编译。错误‘fabs‘ was not declared in this scope 解决办法_第3张图片
然后就可以编译通过
Matlab使用 ‘MinGW64 Compiler (C++)‘ 编译。错误‘fabs‘ was not declared in this scope 解决办法_第4张图片

你可能感兴趣的:(c++,matlab,开发语言)