Unzip all of the files into a new directory (C:\Watcom, for example), preserving the internal directory structure of each file

    If you downloaded the Fortran 77 files, unzip them into the same directory (the C/C++ and Fortran files use the same compiler and tools)

    The directory structure should be as follows:
    • BINP
      • DLL
      • HELP


    • BINW
    • EDDAT
    • H
      • SYS


    • LIB286
      • DOS
      • OS2
      • WIN


    • LIB386
      • DOS
      • NT
      • OS2
      • WIN


    • SAMPLES
      • CLIBEXAM
        • KANJI
        • TEST
      • CPLBEXAM
        • COMPLEX
          • FRIEND
          • PUBFUN
          • RELFUN
          • RELOP
        • CONTAIN
        • FSTREAM
          • FSTREAM
          • IFSTREAM
          • OFSTREAM
        • IOS
        • IOSTREAM
          • IOSTREAM
          • ISTREAM
          • OSTREAM
        • STRING
          • FRIEND
          • PUBFUN
        • STRSTREA
          • ISTRSTRE
          • OSTRSTRE
          • STRSTRE
      • DLL
      • GOODIES
      • IDE
        • OS2
        • WIN
        • WIN32
        • WIN386
      • WIN
        • ALARM
          • WIN16
          • WIN32
          • WIN386
        • DATACTL
          • WIN16
          • WIN32
          • WIN386
        • EDIT
          • WIN16
          • WIN32
          • WIN386
        • GENERIC
          • WIN16
          • WIN32
          • WIN386
        • HELPEX
          • WIN16
          • WIN32
          • WIN386
        • ICONVIEW
          • WIN16
          • WIN32
          • WIN386
        • LIFE
          • WIN16
          • WIN32
          • WIN386
        • SHOOTGAL
          • WIN16
          • WIN32
          • WIN386
        • WATZEE
          • WIN16
          • WIN32
          • WIN386

    • SRC
      • CPPLIB
        • CONTAIN
      • EDITDLL
      • INC
      • OS2
        • PDD
      • STARTUP
        • 386
        • ADS
        • DOS
        • OS2
        • WIN

    Place the *.inf, *.hlp and/or *.pdf help files in ...\BINP\HELP. If you like, create an easily accessible program object (on the desktop, for example) for each of these files

    Set the various path and environmental variables used by Watcom:
    • Update the CONFIG.SYS file (in the examples, below, assume that Watcom is installed in C:\WATCOM\. Also, do not include anything in parentheses; that is here for your information, only):
      • LIBPATH=...,;C:\WATCOM\BINP\DLL;
        (Watcom dynamic link library (DLL) path))
      • PATH=...,;C:\WATCOM\BINP;C:\WATCOM\BINW
        (path for Watcom executables)
      • SET HELP=.; ...,;C:\WATCOM\BINP\HELP;
        (Watcom help files)
      • SET BOOKSHELF=...,;C:\WATCOM\BINP\HELP;
        (Watcom *.Inf bookshelf files)
      • SET INCLUDE=...,;C:\WATCOM\H;C:\DDK\BASE\ibmh;
        (Watcom and OS/2 Toolkit include files (header files))
      • SET LIB=...,;C:\DDK\BASE\lib\;C:\WATCOM\LIB386; C:\WATCOM\LIB386\OS2;
        (Watcom and OS/2 Toolkit library files (NOTE: the Watcom linker can locate runtime libraries without setting this variable))
      • SET WATCOM=C:\WATCOM
        (Watcom environmental variable (points to the directory where Watcom is installed))
      • SET EDPATH=C:\WATCOM\EDDAT
        (Path to text editor, used to create/edit Watcom source code files)
      • RUN=C:\WATCOM\BINP\BATSERV.EXE
        (Required by the Integrated Development Environment (IDE) application)
      • RUN=C:\WATCOM\BINP\NMPBIND.EXE
        (Used for Named Pipe Remote Debugging support of the Watcom Debugger)
    • Alternatively, create a runtime batch file to update the paths and environmental variables:
      • Place the following lines in the batch file (example, only):
        • SET WATCOM=C:\WATCOM
        • SET TOOLKIT=C:\DDK
        • SET BEGINLIBPATH=%WATCOM%\BINP\DLL
        • SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%PATH%
        • SET HELP=%WATCOM%\BINP\HELP;%HELP%
        • SET BOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF%
        • SET INCLUDE=%WATCOM%\H;%TOOLKIT%BASE\ibmh
        • SET EDPATH=%WATCOM%\EDDAT
        • SET LIB=%TOOLKIT%DDK\BASE\lib\;%WATCOM%\LIB386;%WATCOM%\LIB386\OS2;
        • DETACH %WATCOM%\BINP\BATSERV.EXE
        • DETACH %WATCOM%\BINP\NMPBIND.EXE
      • Execute the batch file before using any Watcom application. Create a program object to run the batch file. Configure the program object as follows:
        • Path and file name: *
        • Parameters: /k "Batchfilepath & Watcomapppath"
      • Notes:
        • "Watcomapppath" is the path to the Watcom application, such as the IDE or the Browser, that you want to run under this batch file
        • If you are using 4OS2 instead of cmd.exe, command processor that comes with OS/2, then you do not need "/k" on the parameter line


    Consider creating 2 new environmental variables to aid in the viewing of the Watcom online documentation. That is, add 2 lines, similar to the following, to the CONFIG.SYS file, or to the runtime batch file:
    • SET WATINF=clib.inf+clr.inf+cmix.inf+wpperrs.inf
    • SET WATHLP=ide.hlp+wbrw.hlp+wccerrs.hlp
    Use "View watinf" and/or "View wathlp" at the commandline. Have everything available in one instance of View. Searching is easier
    • Notes:
      • Use only those *.inf and *.hlp files of interest in the Watinf and Wathlp variables
      • Write the set statements following exactly the examples shown above. Do not use the full paths to the *.inf and *.hlp files
      • This technique also works for those using NewView, instead of View
      • The path to view.exe, or newview.exe, must be included in the CONFIG.SYS path statement


    Install/Use OS/2 Toolkit library functions:
    • The toolkit supplies all the headers, libraries and supplemental tools needed to build OS/2 applications
    • The commercial Watcom package ships with an older version of this toolkit
    • The toolkit can be obtained from the following sources, in order from the oldest to the newest:
      • IBM Device Driver Kit (DDK)
      • Developers Toolbox
      • IBM Software Choice MCP
      • E-Commerce Station (ECS)
    • To get started you can download the combase.zip file (~3 MB) from the IBM DDK site:
      • It contains the necessary content of OS/2 Toolkit library files and a minimal content of the IBM header files
      • Find combase.zip in the following 3 places on the DDK site:
        • Input/Output Device Drivers and Test Tools
        • Multimedia Device Drivers and Test Tools
        • Storage Device Drivers and Test Tools


    Correct the \BINW\wlsystem.lnk file. Change line 79 in the file to read "library os2286.lib", instead of "library os2.lib":
    • Without this update you will not be able to create 16 bit OS/2 code (device drivers, for example)
    • NOTE: The Watcom C/C++ Master Index and Watcom C/C++ Programmer's Guide online documentation both erroroneously refer to os2.lib