6. Miscellaneous Portability Topics

In this chapter, several general tips related to portability are discussed. These concepts were not introduced by Netscape and Mozilla, and have been written about elsewhere, but are included for completeness.

Speaking of Mozilla, a document hosted at www.mozilla.org/hacking/portable-cpp.html provides nearly 40 tips for writing portable C++ code. Some of the suggestions are worth considering, but many of them (such as “Don’t use the namespace facility” and “Don’t use Run-time Type Information”) are outdated, referring back to a time when C++ was a relatively new language, and compilers were not uniform in their support of the language standard. Many of the rules are designed to deal with issues related to compilers ...

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.