You can use the LabF XDK to develop local X clients. Local X clients are X windows client applications built to run on a PC (under MS Windows) instead of a UNIX host.
Local X support permits X windows clients to be started and/or displayed locally or remotely on other X servers in the network. Local X support also permits local X clients to run on stand-alone PCs without network support.
To create a local X client, you can use the contents of the LabF XDK in conjunction with the MS Visual Studio 6.0 application development tool.
You need to prepare the source code for your X client for MS Visual C++ development in the following way:
1 Make the following changes to the source code:
a) If you are creating a GUI application X client, change all instances of the fprintf function to STDERR or STDOUT to calls to printf, lprintf, or some other means of displaying output.
b) Change memory allocation and de-allocation routines to their Xlib counterparts.
2 Check for any incompatibilities between MS Windows 9x/ME/NT4/2000/XP and UNIX, including the following:
a) Ensure that there is no UNIX-dependent code that is incompatible with MS Windows 9x/ME/NT4/2000/XP. For example, you must rewrite code that uses such items as timers, mailboxes, and STDIN (for GUI applications).
b) Ensure that the code does not use any keywords reserved for the MS Windows 9x/ME/NT4/2000/XP C compiler as variables, labels, or application-defined function names.
3 Ensure that all functions are properly prototyped.
4 Ensure that the compiler and linker options are correct. You can find the correct options in the sample make files in the source directory.
Any X application uses the variable DISPLAY to determine where the X server is located. Therefore, you must set the DISPLAY explicitly even when the application is running on LabF Xserver (WinaXe, Winaxe Plus or AceaXe Plus) (even though you might expect the application to use the X server on the local machine).
If you run an X client from XServer, DISPLAY is set to 127.0.0.1 (i.e. to localhost). If you try to run the X application directly (say by double-clicking the application icon in Explorer) then the value for DISPLAY should be set in the MS Windows environment or passed directly to the X application via the command line in the shortcut. In LabF Xserver (WinaXe, Winaxe Plus or AceaXe Plus), if you do not specify the command line parameter for DISPLAY, the default value will be 127.0.0.1 (i.e. localhost).