Adding third-party libraries in Ios--xcode

Source: Internet
Author: User

I. Libraries for. h and. A Files only

1. Add the three-party library file to the project

If you add a third-party library that has only. h and. A files, drag the folder directly underneath the item and the following prompt pops up, make sure to tick the options below:

It is important to note that in add to targets it is important to select the target to which you want to add the library file (. A file), which is to tell the project which targets need to include the. a file, otherwise the project target will not contain. a files; this time, go to project goal of adding a third-party library to project (Targets inside)->build Phases->link Binary with Libraries "You can see many of the library files (. A files) that have just been added below:

2, set the third-party library header file path

You also need to tell the project target where the library file was added to find the header file for the third-party library.

Entry to Project--add third-party library->build Settings->search Paths ", where we can see that the project automatically adds a path to the target where to find the. a file:

Then select User Header Search Paths to add the path to the third-party header file:

Parameter explanation: "$ (srcroot)" Inside the path of the header file is a macro definition that represents the absolute path of the current project. Just add the path to the third-party library header file in the project later, for example, here the path to the third-party library header file in the project is "Poco-1.6.0/include".

Adding third-party libraries in Ios--xcode

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.