20050329 How to install STLPort for use with Openwatcom v1.3: 1) Download the STLPort archive: hobbes.nmsu.edu/pub/os2/dev/cplusplus/stlport-4.6.2_os2watcom-01.zip 2) Decide where you want STLPort to be located: On my system I keep STLPort in the the same folder as my "watcom13" directory: Openwatcom is in M:\programs\dev\watcom13 STLPort is in M:\programs\dev\STL Doing this not a requirement. In fact you can locate it nearly anywhere. 3) Unarchive STLPort: The archive does contain a directory structure so you should create the directory you want to hold STLPort and place the archive (.zip file) in this directory. Like I said, I call my STL directory "M:\programs\dev\STL". Once the archive is inside its directory use "unzip stlport-4.6.2_os2watcom-01". 4) Modify the Openwatcom INCLUDE environment variable statement to where it has the "STLPort" directory as the first entry. My STLPort directory is: M:\programs\dev\STL\STLPort If you allowed the Openwatcom installer to modify your config.sys you will need to edit the SET INCLUDE statement in your config.sys to something like this: SET INCLUDE=M:\programs\dev\STL\STLPort;M:\programs\dev\watcom13\H; M:\programs\dev\watcom13\H;\H\OS2 I don't allow the Openwatcom installer to modify my config.sys. I use a file called setowenv.cmd that I run before using Openwatcom. My setowenv.cmd looks like this: @ECHO OFF REM setowenv.cmd - Openwatcom v1.3 SET WATCOM=M:\programs\dev\watcom13 SET STLPORT=M:\programs\dev\stl\stlport SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%PATH% SET INCLUDE=%STLPORT%;%WATCOM%\H;%WATCOM%\H\OS2 SET FINCLUDE=%WATCOM%\SRC\FORTRAN SET EDPATH=%WATCOM%\EDDAT SET HELP=%WATCOM%\BINP\HELP;%HELP% SET BOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF% SET BEGINLIBPATH=%WATCOM%\BINP\DLL When you install Openwatcom it will create a file called setvars.cmd which is what I base my setowenv.cmd from. The reason I changed the name is that I have several batch files to set specific environments and I needed to be able to see which one is which. 5) You should be set. If you use the setowenv.cmd or setvars.cmd to set your Openwatcom environment don't forget to run it before using Openwatcom. Since the STLPort directory is in INCLUDE before the Openwatcom directories Openwatcom will search in ..\STLPort before searching its own directories and it will use the first instance of a needed file it finds. Example code to test installation: // string.cpp // // This file will not compile with Openwatcom v1.3 without STLPort #include #include using namespace std; int main() { // Default constructor, no initialization string S1; // Initialization with a C-Style string string S2("Hello, I'm an old C-style string"); // Initialization with a C++-Style string string S3 = "Hello, I'm a modern C++ string"; // Initialization with another string object string S4 = S3; cout << "S2: " << S2 << endl; cout << "S3: " << S3 << endl; cout << "S4: " << S4 << endl; // Assignment of one string to another S1 = S2; cout << "S1: " << S1 << endl; // S1 is resized as required. // No explicit programming required. S1 = S3; cout << "S1: " << S1 << endl; return 0; } Good luck.