5. Operating System Interfaces and Libraries

In this chapter, we turn our attention to code, which will remain our focus for the rest of this book. As stated earlier, abstraction is a common theme in this book. Without the proper application of abstraction, it is difficult to build portable software. This idea is not new. A well-known example of the power of abstraction can be found by looking back over three decades ago, to when the UNIX operating system was ported to the C programming language. (C was invented just for this task.) Prior to C, UNIX was coded in assembly language, making it anything but portable, and this inhibited its migration to architectures beyond its original incarnation, the PDP/11. The use of C, and its libraries, provided ...

Get Cross-Platform Development in C++: Building Mac OS X, Linux, and Windows Applications now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.