包括犰狳库时的视觉c ++最小最大警告

时间:2018-08-15 15:51:09

标签: c++ armadillo

我在Visual C ++中使用armadillo库来处理一些矩阵和向量运算。这是我的一个cpp文件的样子:

#include "stdafx.h"
#include <cmath>
#include <armadillo>
#include "buildRotMatrix.h"

using namespace std;
using namespace arma;

//code

我编译时收到以下警告:

1>CL : warning : detected 'min' and/or 'max' macros and undefined them;
1>CL : warning : you may wish to define NOMINMAX before including any windows header

我实际上并没有在代码中使用min和max函数,但我想摆脱警告。添加#define NOMINMAX无效,我还没有找到其他解决方案。我不清楚冲突的根源是什么,因为我从Google搜索中了解到的是人们从包含windows.h的内容中获取冲突。

0 个答案:

没有答案