cocos2d-x 3.17.1新建的项目和自带的测试项目编译错误

小猫爱学习 2019-02-01 11:33:44
cocos2dx3.17.1是在官网下载的。按照网上教程用python2.7先setup,然后输入新建命令生成了一个项目。用vs2013编译,有7条警告,11个错误。如下:

警告 1 warning C4244: “初始化”: 从“double”转换到“float”,可能丢失数据 D:\testgame\MyCppGame\cocos2d\external\recast\DetourCrowd\DetourObstacleAvoidance.cpp 334 1 librecast
警告 2 warning C4018: “<”: 有符号/无符号不匹配 d:\testgame\mycppgame\cocos2d\cocos\editor-support\spine\skeletonbinary.c 310 1 libSpine
警告 3 warning C4018: “<”: 有符号/无符号不匹配 d:\testgame\mycppgame\cocos2d\cocos\editor-support\spine\skeletonbinary.c 372 1 libSpine
警告 4 warning C4018: “<”: 有符号/无符号不匹配 d:\testgame\mycppgame\cocos2d\cocos\editor-support\spine\skeletonbinary.c 484 1 libSpine
警告 5 warning C4018: “<”: 有符号/无符号不匹配 d:\testgame\mycppgame\cocos2d\cocos\editor-support\spine\skeletonbinary.c 649 1 libSpine
警告 6 warning C4018: “<”: 有符号/无符号不匹配 d:\testgame\mycppgame\cocos2d\cocos\editor-support\spine\skeletonbinary.c 652 1 libSpine
警告 7 warning C4018: “>=”: 有符号/无符号不匹配 d:\testgame\mycppgame\cocos2d\cocos\editor-support\spine\skeletonjson.c 97 1 libSpine
错误 8 error C1017: 无效的整数常量表达式 (..\AttachmentVertices.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 libSpine
错误 9 error C1017: 无效的整数常量表达式 (..\Cocos2dAttachmentLoader.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 libSpine
错误 10 error C1017: 无效的整数常量表达式 (..\SkeletonBatch.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 libSpine
错误 11 error C1017: 无效的整数常量表达式 (..\SkeletonAnimation.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 libSpine
错误 12 error C1017: 无效的整数常量表达式 (..\SkeletonRenderer.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 libSpine
错误 13 error C1017: 无效的整数常量表达式 (..\SkeletonTwoColorBatch.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 libSpine
错误 14 error C1017: 无效的整数常量表达式 (..\spine-cocos2dx.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 libSpine
错误 15 error C1017: 无效的整数常量表达式 d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\CCGLViewImpl-desktop.h 99 1 libcocos2d
错误 16 error C1017: 无效的整数常量表达式 (main.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 MyCppGame
错误 17 error C1017: 无效的整数常量表达式 (..\Classes\HelloWorldScene.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 MyCppGame
错误 18 error C1017: 无效的整数常量表达式 (..\Classes\AppDelegate.cpp) d:\testgame\mycppgame\cocos2d\cocos\platform\desktop\ccglviewimpl-desktop.h 99 1 MyCppGame

重新弄了几回也不行。编译build文件夹下自带的项目也是一堆错误,难道官方代码有问题?
在官网下载了2.2.6版本就没有问题。那这个3.17.1版本是里面的代码本身有问题吗?
...全文
1051 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
小小鲁创客 2019-02-14
  • 打赏
  • 举报
回复
cocos从3.17开始已经不支持用vs2013,你换个工具。vs2015,vs2017

721

社区成员

发帖
与我相关
我的任务
社区描述
Cocos2d-x相关内容讨论专区
社区管理员
  • Cocos2d-x
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧