-
Notifications
You must be signed in to change notification settings - Fork 185
OW tools usage Overview
Open Watcom comes with a very efficient native 16-bit compiler supporting DOS and Win16 targets and a 32-bit x86 compiler targetting many different OSes (NT/Win32, OS/2, NetWare, Linux, ...). A major aim for the v2 development is support for x86_64 and ARM architectures. The most obvious "competitors" of Open Watcom would be the GCC-based Mingw-w64 for 32 Bit and 64 Bit Win32-targets, DJGPP for 32 Bit DOS targets and the ia16 port for 16 Bit DOS targets.
A striking difference compared to the binutils-based compilers (gcc, clang, pcc) when used as a cross compiler is that Open watcom only uses a single compiler (one for each target CPU architecture) and the target OS is determined by a compilation flag (see "cross compiling" below). Further, many OS-independent libraries lives in a generic architecture-specific location ($WATCOM/lib286 and $WATCOM/lib386) and only libraries with OS-specific features are put into OS-specific sub-directories - this is thanks to the Open Watcom C runtime that is distributed together with the compiler. This means that it is very easy to use a single install of Open Watcom as a cross compiler for a wide range of OSes. In contrast, a cross-compile toolchain based on binutils typically requires building a target-specific "trinity" of binutils, compiler and libc. Another advantage of Open Watcom as a cross compiler is that the resulting binaries and libraries integrate nicely with the target OS. For example, Python compiled with Open Watcom can load plugins compiled with Visual_C++. This is similar to how the different binutils-based compilers (often) can use libraries built with another binutils-based compiler. At this moment, the resulting binaries are not as optimized as those made by GCC.
-
wcc :the 16-bit "compile only" C compiler -
wpp :the 16-bit "compile only" C++ compiler -
wfc :the 16-bit "compile only" Fortran compiler -
wcl :the 16-bit "compile and link" utility for C/C++ -
wfl :the 16-bit "compile and link" utility for Fortran -
owcc:the POSIX compatible "compile and link" utility. SetCC=owccin a project depending on GNU makefiles.
The 16-bit x86 compilers finds its OS-independent libraries in the $WATCOM/lib286 directory and its OS-dependent libraries in $WATCOM/lib286/${target_os} sub-directory.
Some OSes might need extra library paths, which can be added by the LIBPATH environment variable.
-
wcc386:the 32-bit "compile only" C compiler -
wpp386:the 32-bit "compile only" C++ compiler -
wfc386:the 32-bit "compile only" Fortran compiler -
wcl386:the 32-bit "compile and link" utility for C/C++ -
wfl386:the 32-bit "compile and link" utility for Fortran -
owcc :the POSIX compatible "compile and link" utility. SetCC=owccin a project depending on GNU makefiles.
The 32-bit x86 compilers finds its OS-independent libraries in the $WATCOM/lib386 directory and its OS-dependent libraries in $WATCOM/lib386/${target_os} sub-directory.
Some OSes might need extra library paths, which can be added by the LIBPATH environment variable.
To cross compile, set the correct environment variables and a compile flag telling the compiler which target is intended. Without compile flags defining target, a native build is assumed.
By default OW is setup for native compilation "<compilation target> == <host system>" that for such compilation no extra setup is necessary.
Following environment variables are setup per <installation>.
| Variable | Value | Description |
|---|---|---|
| WATCOM | <path> |
where OW installation is located <OW root>
|
| WIPFC | <path> |
where wipfc compiler supplementaly files are located <wipfc subdirectory>
|
| EDPATH | <path> |
where vi editor script files are located <eddat subdirectory>
|
Following environment variables are setup per <host system>.
| Variable | Value | Description |
|---|---|---|
| PATH | <path> |
add to PATH where OW host binaries are located, by example %WATCOM%\binw for DOS |
For cross compilation following environment variables must be changed per <target system>.
| Variable | Value | Description |
|---|---|---|
| INCLUDE | <path> |
where target header files are located, by example %WATCOM%\h for DOS |
| compiler | target option |
|---|---|
| wcc | -bt=dos |
| wpp | -bt=dos |
| wfc | |
| wcl | -bcl=dos |
| wfl | -l=dos or -lr |
| owcc | -bdos |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/h |
| INCLUDE | non-Linux | %WATCOM%\h |
| compiler | target option | DOS Extender |
|---|---|---|
| wcc386 | -bt=dos | any |
| wpp386 | -bt=dos | any |
| wfc386 | any | |
| wcl386 | -bt=dos -l=dos4g | DOS4GW |
| wcl386 | -bt=dos -l=causeway | Causeway |
| wcl386 | -bt=dos -l=dos32a | DOS32A |
| wcl386 | -bt=dos -l=pmodew | PMODE/W |
| wfl386 | -l=dos4g | DOS4GW |
| wfl386 | -l=causeway | Causeway |
| wfl386 | -l=dos32a | DOS32A |
| wfl386 | -l=pmodew | PMODE/W |
| owcc | -bdos4g | DOS4GW |
| owcc | -bcauseway | Causeway |
| owcc | -bdos32a | DOS32A |
| owcc | -bpmodew | PMODE/W |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/h |
| INCLUDE | non-Linux | %WATCOM%\h |
16-bit target
| compiler | target option |
|---|---|
| wcc | -bt=windows |
| wpp | -bt=windows |
| wfc | |
| wcl | -bcl=windows |
| wfl | -l=windows |
| owcc | -bwindows |
32-bit target (with OW 32-bit WIN386 Extender)
| compiler | target option |
|---|---|
| wcc386 | -bt=windows |
| wpp386 | -bt=windows |
| wfc386 | |
| wcl386 | -bt=windows -l=win386 |
| wfl386 | -l=win386 |
| owcc | -bwin386 |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/h:$WATCOM/h/win |
| INCLUDE | non-Linux | %WATCOM%\h;%WATCOM%\h\win |
| compiler | target option |
|---|---|
| wcc386 | -bt=nt -bc |
| wpp386 | -bt=nt -bc |
| wfc386 | |
| wcl386 | -bcl=nt -bc |
| wfl386 | -l=nt |
| owcc | -bnt -mconsole |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/h:$WATCOM/h/nt |
| INCLUDE | non-Linux | %WATCOM%\h;%WATCOM%\h\nt |
| compiler | target option |
|---|---|
| wcc386 | -bt=nt -bg |
| wpp386 | -bt=nt -bg |
| wfc386 | |
| wcl386 | -bt=nt -l=nt_win -bg |
| wfl386 | -l=nt |
| owcc | -bnt_win -mwindows |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/h:$WATCOM/h/nt |
| INCLUDE | non-Linux | %WATCOM%\h;%WATCOM%\h\nt |
| compiler | target option |
|---|---|
| wcc386 | -bt=linux |
| wpp386 | -bt=linux |
| wfc386 | |
| wcl386 | -bcl=linux |
| wfl386 | -l=linux |
| owcc | -blinux |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/lh |
| INCLUDE | non-Linux | %WATCOM%\lh |
| compiler | target option |
|---|---|
| wcc | -bt=os2 |
| wpp | -bt=os2 |
| wfc | |
| wcl | -bcl=os2 |
| wfl | -l=os2 or -lp |
| owcc | -bos2 |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/h:$WATCOM/h/os21x |
| INCLUDE | non-Linux | %WATCOM%\h;%WATCOM%\h\os21x |
| compiler | target option |
|---|---|
| wcc386 | -bt=os2 |
| wpp386 | -bt=os2 |
| wfc386 | |
| wcl386 | -bt=os2 -l=os2v2 |
| wfl386 | -l=os2v2 |
| owcc | -bos2v2 |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/h:$WATCOM/h/os2 |
| INCLUDE | non-Linux | %WATCOM%\h;%WATCOM%\h\os2 |
| compiler | target option |
|---|---|
| wcc386 | -bt=netware |
| wpp386 | -bt=netware |
| wfc386 | |
| wcl386 | -bcl=netware |
| wfl386 | -l=netware |
| owcc | -bnetware |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/h:$WATCOM/novh |
| INCLUDE | non-Linux | %WATCOM%\h;%WATCOM%\novh |
Some packages may need a proprietary set of libraries and headers from Novell.
| compiler | target option |
|---|---|
| wcc386 | -bt=rdos |
| wpp386 | -bt=rdos |
| wfc386 | |
| wcl386 | -bcl=rdos |
| wfl386 | -l=rdos |
| owcc | -brdos |
| Variable | host | Value |
|---|---|---|
| INCLUDE | Linux | $WATCOM/rh |
| INCLUDE | non-Linux | %WATCOM%\rh |
- Welcome
- Building
- Open Watcom Documentation
- Notes
- Relicensing effort
- Debugging
- OW tools usage Overview
- OW tools usage with CMake
- OW tools usage with Visual Studio Code
- Open Watcom 1.9 Wiki
OW Development
WGML Development
- WGML
- Augmented Devices
- Binary Device Files
- Common File Blocks
- COP Files
- Device File Blocks
- Device Function Language
- Device Function Notes
- Device Functions
- Directory File Format
- Drawing Boxes
- Driver File Blocks
- File and Directory Names
- Font File Blocks
- Fonts
- GML Tag Notes
- Keyword Statistics
- Macros and User Defined Tags
- Meta Data
- Page Layout Subsystem
- Search Paths
- Sequencing
- System Symbol Notes
- Tabs and Tabbing
- whpcvt Utility interaction