Chapter 9. Libraries and Dependent Targets

Doing all the statistical work in Linrg has been fun, but it’s time to bring that tool into the application. In this chapter, we’ll create a C library for linear regressions as an additional target for the Linear project. We’ll see how to make one target in a project depend on another, so our application target can always be assured of a current version of the library.

Adding a Target

We want our project to produce an additional product: a static library. Each product in a project is the result of a target. In the Project menu, select New Target . . . . The New Target Assistant appears (Figure 9.1), from which you should select BSD → Static Library. Name the target Regression, and let it be added to project ...

Get Step into Xcode Mac OS X Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.