Multiple files
Notice that your project now has executable code in two files: main.m and BNRPerson.m. (BNRPerson.h is a declaration of a class and has no executable code in it.) When you build the project, these files are compiled separately and then linked together. It is not uncommon that a real-world project will consist of hundreds of files of C and Objective-C code.
When Xcode builds your project, it compiles each of the .m and .c files into machine code. Then, it links those files together with any libraries into the executable file. What libraries? In this section of the book, all of your executables have been link to the Foundation framework.
There are many libraries of reusable code downloadable from the internet. A ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access