Developing a Static Library and Incorporating It in Your Application
When you need to develop a static library to use in an application and you have to have separate projects for each product, you can use a workspace to contain both the static library project and the application project. If you do, ensure that you configure the projects in the workspace as described here:
In the target that builds the static library, ensure that:
The exported headers are in the Project group in the Copy Headers build phase.
The Skip Install build setting is set to Yes.
In the target that builds the application, ensure that:
The User Header Search Paths build setting is set to the recursive absolute path of a directory under which the static library’s header files are stored.
Important: If you move your static library project directory to a different location in your file system, you must update the value of the User Header Search Paths build setting to reflect the new location of the static library’s header files.
The Always Search User Paths build setting is set to Yes.
The Skip Install build setting is set to No.
In the scheme that builds the application, ensure the scheme also builds the static library for archiving.
No comments:
Post a Comment