iOS instruction set query tips

Source: Internet
Author: User

Tag:io   ar   os    use     file    on     code    ef   as   

1, write the. c or. m file in the shell terminal, you need to compile the. o file (that is, gcc-c ***.c/***.m), you can generate ***.O file 2, in the shell input AR CRS lib***.a ***.O, you can generate LIB***.A library file 3, Enter NM./***.out in the shell to view the binary file 4, enter the Lipo-info lib***.a file in the shell terminal, or the file lib***.a, if the output is X86, the instruction set of the Mac, if the output is ARM7, ARM64 is the instruction set 5 of the real-world device (iOS device), the program running on the emulator cannot run on the iOS device, and the program running on the iOS device cannot run on the emulator, because the simulator uses the X86 instruction set, the real-machine device uses the ARM7 instruction set 6, in Xcode 6.1 , there are 3 methods including 3rd party open source Code introduction project: 1th way to create Cocoa Touch static Library class, generate ***.A library file, loccation location in Xcode6.1 preferences, default in/users/ Apple/library/developer/xcode/deriveddata path, and then find your project name, find the ***.A library file, if the compilation is selected is the emulator, the resulting ***.a file is X86 (Mac OS computer) instruction set, if the compile-time selection of iOS device compilation, that is, the generated ***.a is the ARM7 or ARM64 instruction set, you can also through the shell Terminal command to see which instruction set the 2nd way is when there is ready-made open source code, The entire Xcode project can be added to the current project projects, you can modify the open: source code, compile automatically update the ***.a file. Note The above method: you need to specify the ***.h file path in the project compilation settings (Building Setting), add ***.a files in the build Phases link 3rd to create the Cocoa Touch Framework Project First, That is, create a framework framework, build the. framework file, and then add ***.framework file 7 to the link in build phases, Lipo-create lib***1.a lib***2.a in the shell -output lib***12.a, where lib***1.a represents the set of instructions that are compiled for the iOS real-machine device, lib***2.a generationTable Select the set of instructions compiled by the simulator, lib***12.a is the result of lib***1.a and lib***2.a encapsulation, which can be used later by both the emulator and the real machine.

iOS instruction set query tips

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.