【发布时间】:2018-03-17 14:15:29
【问题描述】:
我已经通过cmake编译了lzo的原始代码,并尝试调试VS项目lzo.sin,但是VS的提示指出
#error: Macro definition of snprintf conflicts with Standard Library function declaration,
然后我发现有人说是因为VS2015定义了snprintf,项目中的代码也定义了它,因此出现错误。我将lzo_supp.h文件中的代码#define snprintf _snprintf替换为
# ifndef
# define snprintf _snprintf
# endif
但错误仍然存在。我不知道如何解决。
【问题讨论】: