IOS compilation details

Source: Internet
Author: User

1. llvm3.0 must be used to use arc. llvm3.0 has a powerful new feature called automatic reference counting. After this option is enabled, llvm will automatically help developers to manage the memory manually during the compilation phase. At the same time, retain, release, and autorelease in all code will be marked as errors. That is to say, we do not need to manage the memory in a way that is too painful. Arc not only fixes errors, but also enhances performance. According to WWDC
During the 2011 conference, retain/release was 2.5 times faster, @ autoreleasepool was 6 times faster, and objc_msgsend was 33% faster. If you do not need an arc file, add the "-fno-objc-arc" Compilation option.


2. When arc is not used, the compiler can use GCC or llvm3.0.


3. introduced the C ++ static library. The. M files related to the static library should be changed to. Mm files, including appdelegate. M and Main. M.


4. Do not forget to configure header search paths


5. If the introduced static library contains category, add-objc and-all_load to the other linker flag.

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.