Ios-app support arm64 bit, some problems are studied

Source: Internet
Author: User

From February 2015 onwards, Apple will refuse to support the application of arm64, prepare for a rainy day, the recent time, first research.

First of all, it is clear that arm64 is a new CPU architecture, which has a qualitative improvement in addressing range and numerical capacity, but its support requires that the code be defined in two sets (distinguished by __lp64__ macros). For example, the value of void* can no longer be assigned to an int variable.

Change the project to support arm64:
In Xcode project, Target, Build setttings architectures value changed to Standard Architectrues (ARMV7 arm64)-$ (Archs_standard)


No surprises, some problems, a summary of two issues libcurl and Google Protobuf two third-party libraries


One, Libcurl:
The compilation error is "' __curl_rule_01__ ' decleared as an array with a negative size"



Follow the macro definition to find a find is sizeof (long), and Curl_sizeof_long value is not the same.



This kind of code is definitely not working. Google for a while, find a compiled library libcurl for IOS 7.39.0 http://home.comcast.net/~seiryu/libcurl-ios.html
Put your head papers and GINTAICU in the project.
Open code to see



This kind of code is just thoughtful.




Second, Google Protobuf
Compilation error is
#error Host architecture is not detected as supported by Protobuf



Search for a code, and found that the three-party library has passed the __lp64__ definition of two sets of code.
So I'm just taking this line and adding it directly underneath it.
#define GOOGLE_PROTOBUF_ARCH_X64 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1


Other questions, updated at any time after discovery

Ios-app support arm64 bit, some problems are studied

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.