Ios--xcode Compilation Problem Summary

Source: Internet
Author: User

One, the common causes for "Undefined Symbols for Architecture armv7" is:

    1. you  import a header and do not link against the correct library . This was common, especially for headers for libraries like quartzcore since it was not included on projects by default. To resolve:

      • Add the correct libraries and the  Link Binary with libraries em>  section of the  Build phases .

      • If you want to add a library outside of the default search path can include the path in the  library Search Paths  value in the Build Settings and add 
        -l{library_name_ Without_lib_and_suffix}   (eg. for libz.a use  -lz ) to the  Other Linker Flags  section of  Build Settings .

    2. You copy files into your project and forgot to check the target to add the filesto. To resolve:

      • Open the for the correct target, expand Compile Sources and add the missing files. Build Phases .m If This is your issue please upvote Cortex ' s answer below as well.

    3. You include a static library that's built for another architecture like i386, the simulator on your host machine . To resolve:

      • If you have multiple library files from your libraries vendor to include in the project you need to include the one for th E Simulator (i386) and the one for the device (ARMV7 for example).

      • Optionally, you could create a fat static library that contains both architectures.

Ios--xcode Compilation Problem Summary

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.