1. 程式人生 > >vs 2015 編譯cocos2dx 報錯

vs 2015 編譯cocos2dx 報錯

ror library sna log efi lib sta csdn cocos2dx

VS 2015 compiling cocos2d-x 3.3 error “fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration”

原因:vs 2015裏面已經自己定義了snpritf(),而cocos裏面又重新定義了一遍,所以出現了沖突;

#ifdef snprintf
#error: Macro definition of snprintf conflicts with Standard Library function declaration”
#endif

解決:刪除cocos2d 裏 cocos2d\cocos\platform\win32\CCStdC-win32.h的代碼

<p>
#if !defined(isnan)
#define isnan _isnan
#endif</p><p><strong>//#ifndef snprintf
//#define snprintf _snprintf
//#endif</strong></p><p>#endif // __MINGW32__</p>---------------------

作者:余不二
來源:CSDN
原文:https://blog.csdn.net/yu452148611/article/details/46636817

vs 2015 編譯cocos2dx 報錯