Cocos2dx移植到Android平台后编译报错 5
srand((unsigned)time(nullptr));报错jni/../../Classes/UILayer.cpp:Inmemberfunction'voidU...
srand ((unsigned)time(nullptr)); 报错
jni/../../Classes/UILayer.cpp: In member function 'void UILayer::NPCfapai()':
jni/../../Classes/UILayer.cpp:144:24: error: 'nullptr' was not declared in this scope
make: *** [obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/UILayer.o] Error 1
音效也报错
Unresolved inclusion: "SimpleAudioEngine.h"
Symbol 'CocosDenshion' could not be resolved
SimpleAudioEngine::sharedEngine()->playEffect("wav/peng.wav");
Function 'sharedEngine' could not be resolved 展开
jni/../../Classes/UILayer.cpp: In member function 'void UILayer::NPCfapai()':
jni/../../Classes/UILayer.cpp:144:24: error: 'nullptr' was not declared in this scope
make: *** [obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/UILayer.o] Error 1
音效也报错
Unresolved inclusion: "SimpleAudioEngine.h"
Symbol 'CocosDenshion' could not be resolved
SimpleAudioEngine::sharedEngine()->playEffect("wav/peng.wav");
Function 'sharedEngine' could not be resolved 展开
2个回答
展开全部
C++11 没有很深入了解,srand ((unsigned)time(nullptr)); 是否考虑换回srand ((unsigned)time(NULL)); 或者用CCRANDOM_0_1(3.0是否还有这个不知道了)
是否在jni/Android.mk中的LOCAL_WHOLE_STATIC_LIBRARIES添加cocosdenshion_static?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询