Change Reason
Because the iphone 5S A7 CPU iphone 6 (A8 CPU) already supports the 64-bit ARM architecture, it is said that 64-bit processors running 64 code will improve processing power? Therefore the February new submission AppStore app must support 64-bit and June update apps must also be supported.
support for 64bit about Xcode "Build Setting" Settings
1. The architectures parameter in Xcode "Build Setting" must be set to standard architectures (armv7,arm64).
2. Valid architectures in Xcode "Build Setting" contains ARMv6 armv7 arm64
Seemingly two instruction set intersection is the final supported version
cocos2d-x Modify points:Cocos2d-x v2.2.6 has supported 64-bit and can be modified against
1. LIBCURL.A libwebp.a and corresponding header files are replaced with support 64bit Library 2.2.6 Version Lookup
cocos2d/kazmath/src/neon_matrix_impl.ccocos2d/kazmath/src/mat4.c
#if defined(__ARM_NEON__) 替换成 #if defined(_ARM_ARCH_7)
2.luajit does not support 64-bit as follows:
Because Luajit doesn ' t support 64-bit, so we use LUA on IOS 64-bit. Considering performance issue, all other platforms include IOS 32-bit, we uses Luajit. It means that you can not use lua bytecode on iOS if you build a single binary with both 32-bit and 64-bit code
, because LUA bytecode generated by LUA and Luajit is not compatible.
So setting up 64 bits using LUA 32-bit code still uses the Luajit setting as follows:
The library Search Paths in Xcode "Build Setting":
Added: "$ (srcroot)/... /.. /.. /scripting/lua/lua/ios "(Check to match your project path)
Other Linker Flags: Add the following parameters-z-lua (do not understand, ask the big God to answer questions.) Seems to be able to connect to ~)
3. Check third-party libraries, such as Friends of the TalkingData, etc. generally released the latest version
4.cocos2dx.xcodeporjarchitectures parameters do not forget to modify to support 64-bit
5. According to the above changes, the official document 64-bit Transition guide for Cocoa Touch Check Code
The main problem is pointers. 32-bit processor 4-bit, like int can cross. The 64-bit processor pointer is 8-bit and cannot be directly converted to int using intptr_t (defined in different processors with the same number of pointers)
For example:
Cccallfuncnd::create (This, Callfuncnd_selector (TEST::TESTFUNC1), (void *)), NULL);
In the callback to pass the parameter 10 32 bit when the callback parameter void* data Direct (int) data, but 64 bits will mutate, but to be modified to (int) (intptr_t) data
Be careful not to mix with the following usages:
int a = 10
Cccallfuncnd::create (This, Callfuncnd_selector (TEST::TESTFUNC2), &a);
Pass pointer int num = * (int*) data
Cocos2d-x v2.2 iOS project support 64-bit pit record