Cocos2d-x MSVC 2019 compile errors
MagneticPrism opened this issue · comments
I am using version 2.2.6 of cocos2d-x and I am getting errors I'm not sure how to fix.
I am currently trying to compile this for windows and MSVC 2019 is giving me the errors.
I get two errors from stdio.h
. One is from my project and the other is from libCocosDenshion
saying "6>c:\program files (x86)\windows kits\10\include\10.0.19041.0\ucrt\stdio.h(1914): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration."
The five errors after this first two are from libcocos2d
and libExtensions
. 1>c:\users\magneticprism\downloads\cocos2d-x-2.2.6\cocos2dx\platform\third_party\win32\pthread\pthread.h(307): error C2011: 'timespec': 'struct' type redefinition
.
I then get 3 final errors from chipmunk.c
. The errors are 3>c:\users\magneticprism\downloads\cocos2d-x-2.2.6\external\chipmunk\src\chipmunk.c(48): error C3688: invalid literal suffix 'XSTR'; literal operator or literal operator template 'operator ""XSTR' not found
, 3>c:\users\magneticprism\downloads\cocos2d-x-2.2.6\external\chipmunk\src\chipmunk.c(48): error C2143: syntax error: missing ';' before 'user-defined string literal'
, 3>c:\users\magneticprism\downloads\cocos2d-x-2.2.6\external\chipmunk\src\chipmunk.c(48): error C2059: syntax error: 'user-defined string literal'
how you can reproduce this is just to download cocos2d-x 2.2.6, create a new project for visual studio 2019, open and compile it.