Win32ver on Linux

From Open Watcom

Jump to: navigation, search


Setting up Open Watcom (Win32) on Linux

I just wanted to see how well or bad it would work, and took some notes while doing it. Please add your experience and advice to this text.

Getting Wine to work

*IMPORTANT* Make sure you get rid of the old Wine version first, if one exist on your system. Run “wine –version” on the command line (Terminal/Konsole) to check. If an old version is installed, try "dpkg -r wine", "rpm -e wine", “apt-get remove wine” or something equivalent for your system. I wasted lots of time because I did not know that.

Get the newest version (e.g. from ) The following writeup is based on Ubuntu/Debian, and Wine 0.9.6 or 0.9.37 and Open Watcom 1.4 or 1.6; your milage may vary.

The best way to install Wine is to add the WineHQ repository to your package manager as described at, then do "sudo apt-get install wine".

If that doesn't work, you can download the sources and compile from scratch. Go to SourceForge to get the latest Wine source code. Go to and install the recommended development packages. Dowload, unpack, and run


If you don't have all the recommended development packages, you may get errors like this:

*** Warning: X development files not found. Wine will be built without
*** X support, which currently does not work, and would probably not be
*** what you want anyway. You will need to install devel packages of
*** Xlib/Xfree86 at the very least.

If this happens, go back and look at again, then do “./tools/wineinstall” again. The ./tools/wineinstall script will ask for root password when it needs it to install modules, after the compilation is complete.

Installing Open Watcom

With wine-0.9.37, the OW self-extracting installer (open-watcom-c-win32-1.6.exe) runs properly. It will tell you to reboot; you have to simulate this with "wineboot".

Because of the path in the registry, it is now possible to execute commands without specifying full path, like: “wine wcl386”.

Some simple tests

Make a test file 'test.c'

#include <stdio.h>
void main(void)
    printf("Hello Linux world!\n");


wine wcl386 -bcl=linux test.c
chmod u+x test.elf

Nice. It can build Linux executables :-) Then try:

wine wcl386 -bcl=nt test.c
wine wdw test

Hey, source debugging of a Win32 program. It Works(tm)!

The ide looks reasonably nice, and can build and run targets:

wine ide

Shallow testing of all exe files in binnt

Common "problems"
GUI based WIN32 apps show strange effects when resizing the (managed) MDI parent window. The MDI children do not display the window control buttons properly (minimize, restore, close). Console based WIN32 apps (non-cli) must be started with the wineconsole command, rather than plain wine. A big gain for the wineconsole applications would be to get the correct IBM linedraw characters in the terminal window, but at present I do not know how to achieve that.
Update: The wineconsole window has a context menu. Click right mouse button and choose "Set Defaults" to change general settings for wineconsole or "Properties" for current application only. A different font fixes the linedraw problem, but setting a larger number of lines seems not to be communicated to the applications.

The following programs appeared to work

Disclaimer: no extensive testing has been performed.
cl386.exe cl.exe ctags.exe cvpack.exe cvtres.exe dbginst.exe dmpobj.exe drwatcom.exe edbind.exe exe2bin.exe lib386.exe lib.exe link386.exe link.exe mkcdpg.exe ms2wlink.exe nmake.exe owcc.exe rc.exe tcpserv.exe vi.exe viw.exe w32run.exe wasm.exe wbind.exe wbrg.exe wbrw.exe wcc386.exe wcc.exe wcl386.exe wcl.exe wddespy.exe wde.exe wdis.exe wdump.exe wdw.exe wimgedit.exe wlib.exe wlink.exe wmake.exe wpp386.exe wpp.exe wprof.exe wrc.exe wre.exe wsample.exe wspy.exe wstrip.exe wtouch.exe wzoom.exe

The following programs malfunctioned to different degrees

Works for most things. With Wine 0.9.37 and Open Watcom 1.6, it can even build projects properly.


The instruction at 0x00413037 referenced memory at 0x00000000.
The memory could not be read.
Exception fielded by 0x0041da70

Starts and puts up its window properly, but emits this error from wine quite often:

fixme:winsock:convert_socktype_w2u unhandled Windows socket type 5
fixme:winsock:NtStatusToWSAError Status code c0000024 converted to DOS error code 6
fixme:winsock:NtStatusToWSAError Status code c0000024 converted to DOS error code 6
fixme:winsock:NtStatusToWSAError Status code c0000024 converted to DOS error code 6
fixme:winsock:NtStatusToWSAError Status code c0000024 converted to DOS error code 6

Starts, but shows message "Unable to access parallel ports"

No window and no output. Do not know if this is normal.

Comes up and seems to work. Can do simple debugging of 32 bit app!

Debugging a 16 bit app fails with

wine: Call from 0x7b83fa70 to unimplemented function vdmdbg.dll.VDMEnumProcessWOW, aborting


The installer and command line tools seem to work very well. The GUI and full-screen console apps works reasonably well. The 16 bit debugger is not yet supported, but the 32 bit debugger seems to work at first glance. This method presents a possibility for Open Watcom to self host on Linux, without using the GNU compiler toolchain for the first builds. Wine continues to improve impressively (though I might be biased, I'm a Wine developer).

Personal tools