This is the error message:
/Applications/Cocos/Cocos2d-x/cocos2d-x-3.11/tools/simulator/frameworks/runtime-src/proj.android/…/…/…/…/…//tools/simulator/libsimulator/proj.android/…/lib/ProjectConfig/ProjectConfig.cpp:24: error: relocation overflow in R_ARM_THM_CALL
/Applications/Cocos/Cocos2d-x/cocos2d-x-3.11/tools/simulator/frameworks/runtime-src/proj.android/…/…/…/…/…//tools/simulator/libsimulator/proj.android/…/lib/ProjectConfig/ProjectConfig.cpp:26: error: relocation overflow in R_ARM_THM_CALL
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libcocos2dlua.so] Error 1
make: Leaving directory `/Applications/Cocos/Cocos2d-x/cocos2d-x-3.11/tools/simulator/frameworks/runtime-src/proj.android’
Error running command, return code: 2.
Error running command, return code: 14.
Can you show me the command you are running, please?
cd “My cocos2d-x3.11 root”/tools/cocos2d-console/bin/
./cocos gen-libs -c
The command is:
cd “My cocos2d-x3.11 root”/tools/cocos2d-console/bin/
./cocos gen-libs -c
Could you help me,please?
Same problem here.
I am currently compiling, I will update you to what happens.
ProjectConfig.cpp:24: error: relocation overflow in R_ARM_THM_CALL
so iOS builds fine. My Android fails due to my own fault. I need to setup some env vars.
ok, I set my missing env vars and both ios and Android build for me:
BUILD SUCCESSFUL
Total time: 9 seconds
Move apk to /Applications/Cocos/Cocos2d-x/cocos2d-x-3.10/tools/simulator/simulator/android
Build succeed.
running: '/usr/local/Cellar/android-ndk/r10d/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/arm-linux-androideabi/bin/strip -S /Applications/Cocos/Cocos2d-x/cocos2d-x-3.10/prebuilt/android/armeabi/*.a'
(jtsm @ 15 ~/Chukong-Inc/cocos2d-x) git:(v3-doc) 5M $
(jtsm @ 15 ~/Chukong-Inc/cocos2d-x) git:(v3-doc) 5M $ git branch -v
v3 d086965 Merge pull request #15598 from minggo/android-package-name
I built 3.11 but my env var was set to an v3.10 dir.
# Cocos2d-x console
export COCOS_CONSOLE_ROOT=/Applications/Cocos/Cocos2d-x/cocos2d-x-3.10/tools/cocos2d-console/bin
export PATH=$COCOS_CONSOLE_ROOT:$PATH
# Add environment variables for Android Cocos2d-x development
export NDK_ROOT=/usr/local/Cellar/android-ndk/r10d
export PATH=$NDK_ROOT:$PATH
export ANDROID_HOME=/usr/local/opt/android-sdk
#export ANDROID_SDK_ROOT=/usr/local/opt/android-sdk
export ANDROID_SDK_ROOT=/usr/local/Cellar/android-sdk/24.2
export PATH=$ANDROID_SDK_ROOT:$PATH
export PATH=$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH
export ANT_ROOT=/Applications/Cocos/tools/ant/bin
export PATH=$ANT_ROOT:$PATH
Thanks for your help.
So,did you builded it successful on cocos2d-x 3.11?
from cocos/cocos2d.h
#ifndef __COCOS2D_H__
#define __COCOS2D_H__
// 0x00 HI ME LO
// 00 03 08 00
#define COCOS2D_VERSION 0x00031100
Sorry,i can’t understand what’s your mean.
I was showing that I am using v3.11
@yixiaoqingyuz
I have tried it on the v3 branch of cocos2d-x. But there isn’t any error.
In fact, the error relocation overflow in R_ARM_THM_CALL
has occurred in previous version. Take a look at this post:
It has been solved. And the Android.mk & Application.mk of project tools/simulator
on v3 branch has the config: LOCAL_ARM_MODE := arm
.
The config in Application.mk:
The config in Android.mk:
Hope it’s helpful!
@zhangbin
Thank you for your responed.
I have tried it on the v3 branch of cocos2d-x too,yes, it’s ok,but, i am not reference to v3 branch of cocos2d-x,i reference to this one:
http://www.cocos2d-x.org/download
@yixiaoqingyuz
I’ve just tried the command with the downloaded cocos2d-x-3.11. There is also has no any error. Could you please supply more information of your environment?
Maybe you can see here:
same error.
Is this problem solved? Any hints? I tried Git version still have the error.
[armeabi] SharedLibrary : libcocos2dlua.so
/Development/cocos2d-x/tools/simulator/frameworks/runtime-src/proj.android/…/…/…/…/…//tools/simulator/libsimulator/proj.android/…/lib/ProjectConfig/ProjectConfig.cpp:24: error: relocation overflow in R_ARM_THM_CALL
/Development/cocos2d-x/tools/simulator/frameworks/runtime-src/proj.android/…/…/…/…/…//tools/simulator/libsimulator/proj.android/…/lib/ProjectConfig/ProjectConfig.cpp:26: error: relocation overflow in R_ARM_THM_CALL
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libcocos2dlua.so] Error 1
make: Leaving directory `/Development/cocos2d-x/tools/simulator/frameworks/runtime-src/proj.android’
Error running command, return code: 2.
Error running command, return code: 14.
Ok, after adding
ifeq ($(COCOS_SIMULATOR_BUILD),1)
LOCAL_ARM_MODE := arm
endif
to \tools\simulator\libsimulator\proj.android\Android.mk, everything works now.