This section presents issues that might affect your application's portability between different platforms that support the Common Desktop Environment.
To be Common Desktop Environment-compliant, your application must follow the Motif 2.1, ANSI-C, and X11R6 standards. If you are developing your application in C++, use C++ version 2.0 or later. No further assumptions are made that you adhere to any standards, such as POSIX, when you write a Common Desktop Environment application. Applications that use the desktop application program interfaces (APIs) will be portable to other Common Desktop Environment platforms. However, using POSIX can enhance your software's portability.
The POSIX standard, IEEE Std 1003.1-1990, is entitled IEEE Standard for Information Technology--Portable Operating System Interface (POSIX)--Part 1: System Application Program Interface (API) [C Language], ISBN 1-55937-061-0.
The Motif 1.2 standard, IEEE Std 1295, is entitled Standard for Information Technology--X Window System Graphical User Interface--Modular Toolkit Environment.
For information on ordering IEEE Std 1003.1-1990 and IEEE Std 1295, see "Related Books".
Certain libraries that the Common Desktop Environment depends on, for example X11R6, are likely to be installed in different locations on different platforms. Include platform-specific references to accommodate this or write a separate makefile for each platform.
Also, the make program functionality can differ across platforms. If you want to write just one makefile for your application, use the common make functionality used by the platforms to which you want to port your program. Avoid platform-specific make features.
The Common Desktop Environment requires no additional defined constants (-D parameters) to integrate with the desktop. If you do follow a standard, such as POSIX, you might need to compile with additional standard-specific flags. Read about the standard to find out if it includes special compiler considerations.
Each subdirectory of /usr/dt/examples contains sample makefile source files for different platforms. These makefiles take into account system differences. In particular, see the /usr/dt/examples/dtdts directory for generic examples of makefiles.
To enable your application to find the desktop include files, add:
-I/usr/dt/include
to each makefile's compile line.
To enable your application to reference desktop libraries, add:
-L/usr/dt/lib -l<libname1> -l<libname2>...
to each makefile's link line, where libname1, libname2 are the names of libraries your application needs to reference. You can include as many desktop library names in this line as you want. For example:
-L/usr/dt/lib -lDtSvc -ltt -lXm
enables your application to reference the Desktop Services, ToolTalk Messaging System, and Motif 1.2 libraries.
You should limit your application file names, and the file names your application generates, to 14 characters. This will make your application portable to platforms that have this limitation. Some platforms can be configured to have this constraint.
Do not place length limitations on file names that an end user generates.
Your application should support the following display options and configurations:
Monochrome (including black-and-white icons)
Color (including color icons)
Small screens, such as VGA (640x480--scale application window or font size to fit completely on the screen)
If you use the Icon Editor to create color icons, your application will share colors with other desktop applications more readily. This helps conserve color cells when running on a Pseudo Color display.