报错提示调试LZO时snprintf的宏定义与标准库函数声明冲突

The error notes that Macro definition of snprintf conflicts with Standard Library function declaration when debug the LZO

我用cmake编译了lzo的原始代码,我尝试调试VS项目lzo.sin,但是VS的提示指出

#error:  Macro definition of snprintf conflicts with Standard Library function declaration,

enter image description here

然后我发现有人说是因为VS2015定义了snprintf,项目中的代码也定义了,所以errors.I替换了[=24中的代码#define snprintf _snprintf =] 文件

#  ifndef
#    define snprintf _snprintf
#  endif

但错误仍然remained.I不知道如何解决。

我用了

#if _MSC_VER < 1900 
#define snprintf _snprintf
#endif

仍在学习 C++,几周前开始,所以我不知道它是如何修复它的,除此之外只需要在 2015 年以下的 VS 版本上定义它。这是我找到答案的地方 https://forum.juce.com/t/solved-error-with-vs2015-regarding-snprintf/14831/3