axmol/cocos
Vadim Malckin a88ad87731 Bug in mp3reader.cpp (#18476)
* 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....
2017-11-21 16:16:25 +08:00
..
2d set texture anti-alias by deault in RenderTexture (#18442) 2017-11-06 10:28:36 +08:00
3d Fix "Possible misuse of comma operator here" (#18350) 2017-10-12 23:00:04 -05:00
audio Bug in mp3reader.cpp (#18476) 2017-11-21 16:16:25 +08:00
base Bug in mp3reader.cpp (#18476) 2017-11-21 16:16:25 +08:00
deprecated Update license to 2017 (#17362) 2017-02-14 14:36:57 +08:00
editor-support Spine update (#18438) 2017-11-03 13:44:13 +08:00
math Update license to 2017 (#17362) 2017-02-14 14:36:57 +08:00
navmesh Update license to 2017 (#17362) 2017-02-14 14:36:57 +08:00
network fixed #18055: [android] urlConnection.getResponseCode may trigger exception which needs to be handled. (#18056) 2017-07-13 09:53:54 +08:00
physics Calling PhysicsWorld::setDebugDrawMask(false) will no longer crash when DebugDrawMask was already set to false (#17875) 2017-06-05 10:56:52 +08:00
physics3d Update license to 2017 (#17362) 2017-02-14 14:36:57 +08:00
platform fix comments for JniHelper.h (#18481) 2017-11-21 11:36:10 +08:00
renderer Fix CameraBackgroundColorBrush cannot use alpha (#18281) 2017-10-20 09:43:45 +08:00
scripting Unregister spine event lua event handler should set listener to null. (#12845) 2017-11-21 10:55:55 +08:00
storage don't have to set NDK_MODULE_PATH manually 2017-10-26 13:40:27 +08:00
ui no message (#18460) 2017-11-10 15:05:21 +08:00
vr Fixes cocos2d build for tvOS. (#17498) 2017-03-15 10:01:38 +08:00
Android.mk use prebuilt version of Box2D (#18422) 2017-10-31 14:31:23 +08:00
CMakeLists.txt update glfw to 3.2.1 (#18434) 2017-11-02 15:25:12 +08:00
cc_dummy.c Squashed commit of the following: 2016-03-02 16:51:54 -08:00
cocos2d.cpp update version (#18367) 2017-10-12 22:58:43 -05:00
cocos2d.h update version (#18367) 2017-10-12 22:58:43 -05:00