How to speed up cocos2d-x build with prebuilt lib

How to speed up cocos2d-x build with prebuilt lib
0.0 0


hi, I scanned through this, and it looks very promising! Just wondering when the windows example and functionality may be ready? Thanks!


You can create win32 pre-builts already.

cocos gen-libs -p win32


If you change headers and add/remove or invert fields orders you usually need rebuild, otherwise your game will misbehave and its very likely to crash.


You always need to re-build if you make changes.


hi! I just try to prebuilt cocos2dx lib for ios but when I run on ios device using arm64, the project show a lot of error. I see that the lib did not build for arm64, so how can I use prebuild lib to release project ?


Are they part of your target to link against?


Have you managed to solve this? I have the same problem …

ld: warning: ignoring file /path/cocos2d-x-3.14/prebuilt/ios/libcocos2d iOS.a, missing required architecture arm64 in file /path/cocos2d-x-3.14/prebuilt/ios/libcocos2d iOS.a (2 slices)


using prebuild libs “spine” is not working. it was working fine before that.


what version of Cocos2d-x? From .zip on our website or GitHub repo?


coco2d-x 3.14.1. From Website


ok, I think if you use the v3 branch from GitHub this is fixed.

You would need to clone, submodule update, download-deps, re-compile pre-builts. I am in the process of writing docs to help with using pre-builts better and working through issues like what you are having. So let us work together to solve.


sure, i will do this.
make sure you document Android part very detailed as iOS is simple and easy to setup. But i am stuck in android studio setup :frowning:
i am following this Guide but having some issues that i mentioned in comments there.


Yup, the new doc is a lot better. Running Android on OS Xis done. It is currently sitting in a PR waiting for me to finish the Windows OS. I should be able to get to it this week and push changes to production. I have been trying to move our docs to a new platform.


i cloned, download-deps, submodule. but when i tried to build libs i got this strange error i never encountered before.


I Get it. Its a known Bug and under working.
So i think reverting back to android SDK tools to version 25.2.3 will fix this for now. Right?



i did all this, and used this command to build libs : cocos gen-libs -p ios --app-abi armeabi:x86_64 -m debug
is solved the sipn file not found. but giving me these 201 errors


on iOS, I am not sure you need the –app-abi switch. My understanding is that is an Android only thing. Perhaps I am wrong, but I have never used it and I deploy to the App Store all the time.


I re compiled libs using cocos gen-libs -p ios -m debug.
and still geting “missing required architecture arm64” warning as above mentioned. on iPhone6+. On iphone 5 simulator when i try to build it says “missing required architecture i386”


sorry, I am confused. I am reading your posts where you talk about Android and then iOS. Let’s back up.

So you are on 3.14.1, OS X, XCode and trying to compile the pre-built libraries. This should work. I just did this earlier this morning.

git clone <our repo>
cd where-ever-you-cloned-the-repo
git submodule update --init
git submodule update
./ (skip Android pieces by hitting return if you don't need it)
source ~/.bash_profile
which cocos (to verify you get something back)
cocos -v (to verify versions, in case you have more than one on the system)
cocos gen-libs -m release -p ios


i was doing both android and ios.

i did ios step just as you wrote above. only thing i did different i before submodule.
other than that everything is same.
cocos gen-libs -p ios -m debug
this is the command i used for libs