mirror of https://github.com/axmolengine/axmol.git
a88ad87731
* Bug in mp3reader.cpp This directive #include <string.h> is used for memset(b, c, l). Without it the attemt to install .apk (ex. cocos run . -p android --android-studio) is creshed. Found in the downloaded from http://cocos2d-x.org/download version cocos2d-x-3.16 * #include <string.h> added to avoid crash The directive #include <string.h> is used for memset(b, c, l). Without it the attempt to install .apk (ex. cocos run . -p android --android-studio) is crashed. Found in the downloaded from http://cocos2d-x.org/download version cocos2d-x-3.16: Here part of log: In file included from C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorGlobalNewDelete.cpp:27:0: C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorStrategyGlobalSmallBlock.h: In constructor 'cocos2d::allocator::AllocatorStrategyGlobalSmallBlock::AllocatorStrategyGlobalSmallBlock()': C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorStrategyGlobalSmallBlock.h:96:75: error: 'memset' was not declared in this scope memset(_smallBlockAllocators, 0, sizeof(_smallBlockAllocators)); ^ make: *** [C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2dx_internal_static/base/allocator/CCAllocatorGlobalNewDelete.o] Error 1 make: *** Waiting for unfinished jobs.... :TestAndroidGame2:externalNativeBuildDebug (Thread[Task worker for ':',5,main]) completed. Took 16.425 secs. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':TestAndroidGame2:externalNativeBuildDebug'. > Build command failed. Error while executing process F:\android-ndk-r16\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\Vadim\Documents\Cocos2d\TestAndroidGame2\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\Users\Vadim\Documents\Cocos2d\TestAndroidGame2\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:\Users\Vadim\Documents\Cocos2d\TestAndroidGame2\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\debug\lib NDK_TOOLCHAIN_VERSION=4.9 APP_PLATFORM=android-26 NDK_MODULE_PATH=C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x;C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos;C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/external -j4 NDK_DEBUG=1 C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/x86/libcocos2djs.so} [x86] Compile++ : audioengine_static <= mp3reader.cpp [x86] Compile++ : cocos2dx_internal_static <= CCAllocatorGlobalNewDelete.cpp In file included from C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorGlobalNewDelete.cpp:27:0: C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorStrategyGlobalSmallBlock.h: In constructor 'cocos2d::allocator::AllocatorStrategyGlobalSmallBlock::AllocatorStrategyGlobalSmallBlock()': C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorStrategyGlobalSmallBlock.h:96:75: error: 'memset' was not declared in this scope memset(_smallBlockAllocators, 0, sizeof(_smallBlockAllocators)); ^ make: *** [C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2dx_internal_static/base/allocator/CCAllocatorGlobalNewDelete.o] Error 1 make: *** Waiting for unfinished jobs.... |
||
---|---|---|
.. | ||
audio_utils | ||
cutils | ||
jni | ||
utils | ||
Android.mk | ||
AssetFd.cpp | ||
AssetFd.h | ||
AudioBufferProvider.h | ||
AudioDecoder.cpp | ||
AudioDecoder.h | ||
AudioDecoderMp3.cpp | ||
AudioDecoderMp3.h | ||
AudioDecoderOgg.cpp | ||
AudioDecoderOgg.h | ||
AudioDecoderProvider.cpp | ||
AudioDecoderProvider.h | ||
AudioDecoderSLES.cpp | ||
AudioDecoderSLES.h | ||
AudioDecoderWav.cpp | ||
AudioDecoderWav.h | ||
AudioEngine-inl.cpp | ||
AudioEngine-inl.h | ||
AudioMixer.cpp | ||
AudioMixer.h | ||
AudioMixerController.cpp | ||
AudioMixerController.h | ||
AudioMixerOps.h | ||
AudioPlayerProvider.cpp | ||
AudioPlayerProvider.h | ||
AudioResampler.cpp | ||
AudioResampler.h | ||
AudioResamplerCubic.cpp | ||
AudioResamplerCubic.h | ||
AudioResamplerPublic.h | ||
CCThreadPool.cpp | ||
CCThreadPool.h | ||
IAudioPlayer.h | ||
ICallerThreadUtils.h | ||
IVolumeProvider.h | ||
OpenSLHelper.h | ||
PcmAudioPlayer.cpp | ||
PcmAudioPlayer.h | ||
PcmAudioService.cpp | ||
PcmAudioService.h | ||
PcmBufferProvider.cpp | ||
PcmBufferProvider.h | ||
PcmData.cpp | ||
PcmData.h | ||
Track.cpp | ||
Track.h | ||
UrlAudioPlayer.cpp | ||
UrlAudioPlayer.h | ||
audio.h | ||
ccdandroidUtils.cpp | ||
ccdandroidUtils.h | ||
cddSimpleAudioEngine.cpp | ||
mp3reader.cpp | ||
mp3reader.h | ||
tinysndfile.cpp | ||
tinysndfile.h |