iOS Development--Error summary & common errors and warnings in development summary (20)

Source: Internet
Author: User

Summary of common errors and warnings in development (20)ARMv6, ARMv7, armv7s and i386

    • This type of problem is generally related to static libraries.
    • ------------------------------------------
    • I386 is the simulator that displays the i386 error stating that the static library does not support the emulator and only supports the real machine.

ARMv6, ARMV7, armv7s are different instruction sets for arm CPUs and are in principle backwards compatible. such as the IPHONE4S CPU supports ARMV7, but it is compatible with ARMV6, but using ARMV6 instructions may not be able to fully exploit its features. The same IPhone5 CPU supports armv7s, although it is also compatible with ARMV7, but it is unable to perform related optimizations.

The instruction set corresponding to the device is executed only on the target device.

If the "build Active Architecture only" optionin the architectures of the project build setting is selected as Yes, even if you set it to ARMV7, armv7s supports both, Only the packages of the corresponding instruction set will be compiled; If you choose No, the compiler will consolidate two instruction sets together, the package is larger, but can use armv7s optimization on IPhone5, but also can adapt to the old equipment. is generally debug "Build


Active Architecture Only "Select Yesto see if the code logic is problematic with the current schema, and select No at release to adapt to different devices."

In addition, the emulator does not run arm code, and the software is compiled into instructions that x86 can run. So when you build a static library, it will be two. A, one is i386 for running in the emulator, the other is running on the real device, and then using the command to merge two. A into one.

Therefore, if the static libraries used in some programs do not support armv7s, and your project supports armv7s, "XXXX does not contain a (n) armv7s slice:xxxxx for Architecture armv7s" will appear. Compile error , there are two ways to solve this problem:

    • 1. If the source code can be found, you can use the source code to re-play a support armv7s Libaray, or directly in the project using the source code, rather than the static library.
    • 2. If it's not open source, either wait for support from a third-party library, or temporarily let your project not support armv7s.

iOS Development--Error summary & common errors and warnings in development summary (20)

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.