Back: Unix/Windows User Interface Library
Forward: Unix/Windows Issues
FastBack: Unix/Windows Issues
Up: Unix/Windows Portability
FastForward: Writing Portable C++
Top: Autoconf, Automake, and Libtool
Contents: Table of Contents
Index: Index
About: About this document

15.3.4 Unix/Windows Specific Code

When writing a program which should run on both Unix and Windows, it is possible to simply write different code for the two platforms. This requires a careful separation of the operating system interface, including the graphical user interface, from the rest of the program. An API must be designed to provide the system needs, and that API must be implemented separately on Unix and Windows. The API should be set at an appropriate level to avoid the least common denominator effect.

This approach can be useful for a program which has significant platform independent computation as well as significant user interface or other system needs. It generally produces better results than the other approaches discussed above. The disadvantage is that this approach requires much more work that the others discussed above.

This document was generated by Gary V. Vaughan on February, 8 2006 using texi2html