如何处理此错误?我将NOMINMAX添加到预处理器定义中,但它就是不起作用。那么解决方案是什么呢?
错误如下。
ClCompile:
1> tricall.c
1> Detected min macro! OpenMesh does not compile with min/max macros active! Please add a define NOMINMAX to your compiler flags or add #undef min before including OpenMesh headers !
1>d:\programfiles\c_library\openmesh3.2\include\openmesh\core\system\config.h(72): fatal error C1189: #error : min macro active发布于 2015-07-22 22:39:43
您应该添加
#ifdef min
#undef min
#endif在包含OpenMesh标头之前,max也是类似的。
一些没有遵守NOMINMAX的头部正在定义它们。
如果这破坏了依赖这些宏的其他代码,那么使用更复杂的
#ifdef min
#define foo min
#undef min
#endif
/*OpenMesh includes here*/
#ifdef foo
#define min foo
#undef foo
#endif其中foo是你选择的一个符号。
https://stackoverflow.com/questions/31566170
复制相似问题