Add IOS Dynamic State Library

Source: Internet
Author: User

In the build phases settings of the xcode project, you can add the framework and dylib that the project depends on in the "link binary with libraries" section.

There is no problem with the former, and the latter will find that there are multiple different options, for example, to add the Z Library:

You can see four options, three of which have version numbers. Why? How to choose?

Take ios6 SDK as an Example

 

 
CD/applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/developer/sdks/iphoneos6.1.sdk/usr/liyun-l

 

We can see that

 

 
Lrwxr-XR-x 1 root wheel 16 3 15 libz.1.1.3.dylib-> libz.1.2.5.dylib-rwxr-XR-x 1 root wheel 140576 3 15 hour-XR-x 1 root wheel 16 3 15 libz.1.dylib-> libz.1.2.5.dyliblrwxr-XR-x 1 root wheel 16 3 15 libz. dylib-> libz.1.2.5.dylib

Only libz.1.2.5.dylib is an object, and others are soft connections to this object.

 

Understand the dynamic library mechanism. In Linux, It is the so-name mechanism, which is similar in IOS.

Therefore, when adding a library, it is best to add libz.1.dylib and other libraries with only the main version number for better maintenance.

The end.

 

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.