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