FreeImage 编译错误 C1189 VS2015

来源:互联网 发布:火锅店软件 编辑:程序博客网 时间:2024/06/09 09:08

snprintf 重定义错误

fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration 
在Visual Studio 2015中编译 FreeImage会出现 snprintf 重复定义的错误,解决方案为在文件 tif_config.h 中注释掉宏 snprintf 的定义。

FreeImage\Source\LibRawLite\internal\defines.h(80):#define snprintf _snprintf
FreeImage\Source\LibTIFF4\tif_config.h(86):#define snprintf _snprintf

//#define snprintf _snprintf

0 0