First off, there is a start of an OS/2 port, but it's too incomplete. So I decided to try the X-Window version, and I was able to compile it (including sample and the not working wxBuilder) in about two days work. Notice there are possibly other ways, such as trying poring the Windows version using Open32, or waiting for GTK to be ported and then use the GTK version, so if anyone wants to volounteer... This version works with Motif (well, actually I'm using lesstiff); XView has not been tryed, so it may require a little more patching. INSTALLATION The steps to take are more or less the followings: 1) Install the EmX runtime; this is required to run all UNIX-ports, so chances are you already have it. 2) Install GNU sed, GNU yacc, GNU flex and the GNU file utils. All these must be available on your path. Notice that, you may also need to rename or copy the executable, if its name is different (e.g. sedOS2.EXE). 3) If you don't already use it, get gcc for EmX and set it up; you will need C++, the standard C++ library and the bsddev package. You'll also need GNU Make. Again both of these should be available on your path. 4) Of course, you should also install X-Free86/OS2 (including the developer's package). 5) The paths in the makefiles are all junks (you typically don't have usr/..., etc...). Changing the makefile is not useful, because I can't know where you installed all of your programs. This is not a problem, however, as long as you have all the appropriate include and library paths set up in config.sys (see the gcc manuals for this). 6) 'SET gccopt=-Zmtd -D__ST_MT_ERRNO__'. This is needed to compile all OS/2 X-Window programs. 'SET emxopt=-hNN', where NN is a large enough integer number. This is because EmX by default allows 40 file handles per program, and you will probably run out when building the samples. I chosed a value of 6000 for NN, which is probably largely more than enough, but I don't think there is any drawback or side-effect. Again, see the gcc manuals for details. 7) Install a UNIX shell (I used Korn, but any other probably works). You must set OS2_SHELL and COMSPEC to point to ksh.exe before running make (I strongly advise not to change these globally in config.sys, but rather locally in the current OS2 prompt). This is because the makefile uses the CD command with forward slashes, while not encolsing the path in quotes, so CMD.EXE does not understand it. 8) Now, from the UNIX shell, you can 'make -f makefile.OS2X motif' in the src/x directory. This will build the library. 9) You can build the samples, the same way. However, what you'll end up with are ????_motif files with no extension. You must 'emxbind' these to obtain the executables. Note: The latest versions of gcc for EmX do not prepend 'lib' to names of the library you link with; so, for example, in the UNIX makefile libwx_motif.a is created, but the samples gcc ends up searching wx_motif.a. This did not happen with older version of gcc. MakeFile.OS2 have been modified to produce wx_motif.a. If you use old versions of gcc, you'll have to modify the makefile back. Please, if you try this, let oter users know about problems or issues you encounter. This has not been tested thoroughly, so there may still be things to fix. Changes in the source files Here is a description of all changes made to the source files, just in case you care. a) Makefile.OS2 have been derived from Makefile.unx, but include makeos2.env, instead of make.env. b) makeos2.env has been derived from make.env, with the following changes: the C++ compiler is gcc, not g++; lex points to flex; ranlib doesn't exist; the standard C++ library is called stdcpp, not stdc++; socket.lib had to be linked with. c) in wx_imgx.h sys_errlist definition has been changed to match the on in the gcc headers. d) in many places some #if have been changed to alter #inlcusion of system headers (we test wether __EMX__ is defined, in order to find out if OS/2 is being used). Most times the default is good enough, though, so I didn't change all. e) wrong #ifs make the compiler think he doesn't have the sleep() function available, and the surrogate doesn't compile. That function is there, so the conditionals have been changed. f) in wb_utils.cpp I enabled the VMS definition for strcascmp and strncasecmp (again __EMX__ is tested). g) in prologio's makefile.os2 lex.yy.c had to be replaced with lexyy.c, and bin/rm with rm. Andrea Venturoli: a.ventu@flashnet.it