ARC forbids objective-c objects in struct error

Source: Internet
Author: User

1. The old project did not use arc, but the introduction of the third party library is the use of arc.
2. Arc was used for its new project, but the introduction of Third-party libraries or previously written code did not use arc.

In both cases, the direct affirmation is not compiled. You can do this by upgrading the old project to use arc, but this is sometimes cumbersome.
An easy way to do this is to specify whether a single file is compiled with arc.
The method is in build phase inside compile source inside find the need for special processing files, plus the compilation option (Compiler Flags), specifically for the above two different situations.

1. For the first case, add the-FOBJC-ARC option to the source file that uses arc
2. For the second case, add-fno-objc-arc original link: http://blog.163.com/kefan_1987/blog/static/89780131201371211132188/

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.