Watcom C/C++ Explained

Open Watcom C/C++
Author:Watcom
Developer:Sybase, SciTech Software
Latest Release Version:1.9
Latest Preview Version:2.0
Latest Preview Date:[1]
Programming Language:C, C++
Operating System:DOS, Windows, OS/2, Linux
Size:66–84 MB
Platform:x86, IA-32, x86-64
Genre:Integrated development environment
License:Sybase Open Watcom Public License version 1.0

Watcom C/C++ (currently Open Watcom C/C++) is an integrated development environment (IDE) product from Watcom International Corporation for the C, C++, and Fortran programming languages. Watcom C/C++ was a commercial product until it was discontinued, then released under the Sybase Open Watcom Public License as Open Watcom C/C++. It features tools for developing and debugging code for DOS, OS/2, Windows, and Linux operating systems, which are based upon 16-bit x86, 32-bit IA-32, or 64-bit x86-64 compatible processors.

History

Though no longer sold commercially by Sybase, the Watcom C/C++ compiler and the Watcom Fortran compiler have been made available free of charge as the Open Watcom package.

Stable version 1.9 was released in June 2010.[2] [3]

A forked version 2.0 beta was released that supports 64-bit hosts (Windows and Linux), built-in text editor, 2-phase build system, and the DOS version supports long filenames (LFN).[4]

Release history

The Open Watcom Wiki has a comprehensive history.[3]

Date Product Notes
1984
1985
  • Work on current code generator codebase started
1988
  • DOS host and target only
  • Included a debugger and full set of runtime libraries
  • Generated better code than other compilers at the time
  • Watcom C Version 6.5 contained Graphics Library similar to Microsoft Graphics Library
  • Real mode support only
1989
1989
1990
1990
1991
1991
1992
1992
  • OS/2 2.0 host and target support
  • 486 optimizations
  • Based pointer support
1993
1993
1994
  • MFC included
  • Precompiled header support
  • 16-bit and 32-bit tools merged into single package
  • Redesigned debugger
  • C++ class browser added
  • Windows resource editors added
  • Graphical IDE for Windows and OS/2
1995
1996
  • Structured exception handling in C
  • Improved compatibility with Microsoft compilers
1997 Q1[5]
  • Namespace, RTTI, and new style cast support in C++ compiler
  • 64-bit integer support
  • Multi-byte character support in libraries
  • Incremental linking support
  • COFF and ELF object file support in linker and librarian
  • Microsoft clone tools added
  • DLL based tools for better IDE integration
  • MMX support, including debugging
  • Pentium Pro optimizations, including branch prediction
  • Novell NLM support
1998
1999-06-30
2000-08-22
  • Sybase announces open sourcing of Watcom tools[7]
2001-09-27
2002-12-21
2003-01-28
2003-08-12
2004-01-07
2004-08-03
2005-12-14
2006-04-26
2006-12-15
2007-08-18
2007-10-23
2009-02-21
2010-06-02
  • Current official version
2015-04-02
  • GitHub V2 fork, numerous fixes
  • Open Watcom ported to 64-bit hosts (Windows and Linux)
  • Resource compiler and Resource editor support WIN64 executables
  • built-in text editor
  • two-phase build system
  • DOS version of tools support long filenames (LFN)

License

See main article: Sybase Open Watcom Public License. The Open Source Initiative has approved the license as open source, but Debian, Fedora and the Free Software Foundation have rejected it because "It requires you to publish the source code publicly whenever you “Deploy” the covered software, and “Deploy” is defined to include many kinds of private use."[8]

Design

The compiler can be operated from, and generate executable code for, the DOS, OS/2, Windows, Linux operating systems. It also supports NLM targets for Novell NetWare. There is ongoing work to extend the targeting to Linux[9] and modern BSD (e.g., FreeBSD) operating systems, running on x86, PowerPC, and other processors.

The code is portable and, like many other open source compiler projects such as GCC or LCC the compiler backend (code generator) is retargetable.

Uses

In the mid-1990s some of the most technically ambitious DOS computer games such as Doom,[10] Descent, Duke Nukem 3D, Rise of the Triad,[11] and Tomb Raider were built using Watcom C/C++ using the DOS/4GW protected mode extender with the Watcom compiler.

It was used to port the game Retro City Rampage to DOS in 2015.[12]

It is used by VirtualBox to compile the BIOS.[13]

Current development for FreeDOS requires that all C source code must be compilable by Open Watcom C.[14]

Open Watcom is the recommended compiler for application and driver development for the OS/2-based ArcaOS operating system.[15]

Variants

There is an unofficial fork[16] of Open Watcom V2 on GitHub.[17] A variant of the 16bit DOS CRT library startup was created with WASM.[18]

Compatibility

Open Watcom's syntax supports many conventions introduced by other compilers, such as Microsoft's and Borland's, including differing conventions regarding (for instance) the number of leading underscores on the "asm" tag. Code written specifically for another compiler rather than standard-compliant C or C++ will often compile with the Watcom compiler.

The compiler supports C89/C90 standards by default.

Open Watcom supports partial compatibility with the C99 standard. It implements the most commonly used parts of the standard. However, they are enabled only through the undocumented command-line switch "-za99". Three C99 features have been bundled as C90 Extension since pre-v1.0: C++ style comments (//), flexible array members, trailing comma allowed in enum declaration.[19]

The compiler currently doesn't support any new major C11 features, though the C library does include "Safe C" functions. It is specified in ISO/IEC TR 24731-1[20] [21] and known as "Bounds-checking interfaces (Annex K)" in C11. Some function name examples are strcpy_s, memcpy_s, printf_s.[22] This library was released along with Open Watcom 1.5 in April 2006.

See also

Further reading

External links

Current
Archives

Notes and References

  1. Web site: Release 2022-12-01 Build · open-watcom/open-watcom-v2 . GitHub . en.
  2. Web site: Latest Release (June 2010) - Open Watcom . January 18, 2015 . https://web.archive.org/web/20150118220613/http://www.openwatcom.org/index.php/Main_Page . OpenWatcom.org wiki . dead.
  3. Web site: C Compiler Release Changes . Open Watcom . https://web.archive.org/web/20150203100434/http://www.openwatcom.org/index.php/C_Compilers_Release_Changes . February 3, 2015 . March 9, 2010 . dead.
  4. https://open-watcom.github.io/open-watcom/ List of main differences of v1.9 to v2.0 Beta.
  5. https://web.archive.org/web/20001005050645/http://dynamic.sybase.com/press_releases/press_releases/ExternalItem/0,1099,6,00.html SYBASE INC. ANNOUNCES WATCOM C/C++ VERSION 11.0 Includes New Support For MMX Technology and Improved C++ language Support
  6. https://web.archive.org/web/20001205233700/http://techinfo.sybase.com/css/techinfo.nsf/DocId/ID=20510 End of Life Notice for Watcom C/C++ Version 11.0
  7. https://web.archive.org/web/20000925164208/http://www.sybase.com/detail/1,3151,1010040,00.html Sybase to Open Source Watcom C/C++ and Fortran Compilers - SciTech Software Selected as Official Maintainer for the Open Watcom Project
  8. Web site: Free Software Foundation. Various Licenses and Comments about Them. GNU Operating System. Dec 23, 2014.
  9. https://web.archive.org/web/20150506003855/http://openwatcom.org/index.php/Installing_Open_Watcom_on_Linux Installing Open Watcom on Linux - Open Watcom
  10. http://wiki.openwatcom.org/index.php/History History - Open Watcom
  11. Web site: RotT was written in Watcom C++ v10.0 with the Rational Systems DOS/4GW extender.
  12. Web site: How 5 years of burning ambition brought Retro City Rampage to DOS . 10 July 2015 . Gamasutra .
  13. Web site:
    1. 12011 (Compiling BIOS requires Open Watcom compiler)– Oracle VM VirtualBox
    . www.virtualbox.org. 2017-06-17.
  14. Web site: FreeDOS Spec . . https://web.archive.org/web/20190501051417/http://wiki.freedos.org/wiki/index.php/FreeDOS_Spec . May 1, 2019 . live.
  15. Web site: Information for developers. arcanoae.com. 2020-09-06.
  16. Web site: Open Watcom V2 Fork.
  17. Web site: Open Watcom V2 Fork Project on GitHub. GitHub.
  18. Web site: pcdosasm.zip archive. Modified Open Watcom C/C++ DOS 16-bit ..\STARTUP\DOS\CSTRT086.ASM code. 2010-07-27. 2014-02-10.
  19. Web site: C99 compliance in Open Watcom . 2020-11-30.
  20. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1225.pdf ISO/IEC TR 24731-1; Extension to the C Library, Part 1: Bounds-checking interfaces.
  21. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1969.htm WG14 N1969 — "Updated Field Experience With Annex K — Bounds Checking Interfaces", Carlos O'Donell, Martin Sebor
  22. Web site: Open Watcom Safer C Library . 2020-11-30.