LabF XDK - Make Your Windows X Apps
|Products||DownloadPrice & OrderSupportCompanyTutorialsSitemap|
|Previous | Next
Porting X Window Applications to LabF Xserver
When porting any X window application to LabF Xserver (WinaXe, WinaXe Plus or AceaXe Plus), the first step is to ensure that the build environment is fully set up on LabF Xserver.
Quite often, code for X applications are generated using specific tools. If your code is created using a code generator and the code generator is not available on LabF Xserver, you must take the code that was generated using the code generator to LabF Xserver and port it.
The next step is to compile the source code and resolve issues as they appear. Typical issues are related to path differences, potentially non-existent device files, environment differences, etc. You might need to modify the paths for including the X11 and/or Motif include files and libraries.
There could be differences in the header files and in specific APIs, or there may be missing header files and APIs. The differences can be resolved by writing LabF Xserver (WinaXe, WinaXe Plus or AceaXe Plus) implementations for the APIs and header files.
If your applications include scripts, such as Perl scripts, these will have to be modified to account for the platform differences.
If you are porting a GUI application client receiving input via STDIN, use an alternate method of receiving input, such as a Windows dialog box.
Xlib contains its own memory management routines, including Xfree, Xmalloc, and Xcalloc. In order to maintain compatibility with future versions of the LabF XDK, use these routines instead of Microsoft WIN32 memory management routines.
Memory allocated by these Xlib routines should be freed using Xlib routines. Similarly, memory that is freed using Xlib routines should be allocated by Xlib routines.
Xlib.dll exports the gethostname function. A function by this name is also exported by the Windows Sockets DLL.
We do not recommend that you use the Xlib.dll version of this function; it is provided by Xlib only for backwards compatibility. In order to ensure that you are using the Windows Sockets version of this function, and not the Xlib.dll version, your link statement must include WSOCK32.lib before Xlib.lib.
The default value for the run-time control variable XLOCALEDIR is home\x11\locale. The locale.dir file is in the home\x11\locale directory.
Locale aliases are supported. You can specify your locale alias in the locale.alias file in the home\x11\locale directory.
X11R6 XIM support is included on the X server side. This support lets local X clients accept localized input when displaying to an X server that supports X11R6 XIM (such as XServer in WinaXe, WinaXe Plus or AceaXe Plus).
There are some restrictions on developing an X application code with the LabF XDK:
> XDK (X Development Kit)
|Previous | Next|