Monday, October 26, 2009

Section 7.9.  Building










7.9. Building


Our first iteration of Linear is complete. Try running it; run it under the debugger if you're cautious. Add lines to the data point table and fill them with data; note that the Compute button activates when the second point is added. Try removing a point. Click Compute and see whether the values displayed make sense. Close the document window and save it. Select File Open . . . to open it up again.


Linear behaves like a real applicationalbeit one that is short on such important features as automatic calculation, undo, and dirty-document detection.



Build configurations are covered in much more detail later in this book; for now, think of them as named groups of build system settings that make a product more suitable for debugging or for release. Recall that in Section 5.2, we added Linrg as a dependency of the Linear target. Whenever something in Linrg changes, Linear sees to it that Linrg is recompiled and the fresh version imported.


But what settings are used to build Linrg in such circumstances? Are they the current compiler settings for Linear? The answer is no. Linrg will be built using the build configuration that has the same name as the active configuration of the project doing the building. If the same name isn't available, the configuration designated as default is used.


It is important to make sure that your configuration names are consistent across projects. Xcode's templates take care of this, giving you Debug, Release, and Default configurations for every new project.














No comments: