简体   繁体   中英

Setting up the compiler Open watcom in windows XP

I installed the compiler "Open watcom" on my OS Win XP, which I run under Virtual Box.
I installed program in automode: full package and with auto changes to autoexec and config files, where all needed info for environment variables was inserted during installation.

I can`t compile C project for DOS 16 bits , I get the error :

WxD WDEBUG.386 not present.

I tried to modify "system.init" file and inserted "device=c:\\watcom\\binw\\wdebug.386 " in [386enh] directory (it was adviced in FAQ in one of the sites related to open watcom), but that gave no effect.

I need help! What should I do to make c projects compile and resolve issue with wdebug.386 Thanks in advance!

I have never had such issues with OW.

I have installed it either using the default configuration or choosing the host OS as Windows. With that configuration OW by default creates Win32 apps. If you want to create DOS apps, you need to invoke the compiler in a special way.

This is what works for me on Windows 7 64-bit:

// file: hw.c
// compile with Open Watcom C/C++ 1.9 under Windows: wcl -q -bt=DOS hw.c
#include <stdio.h>

int main(void)
{
  printf("Hello world!\n");
  return 0;
}

And then I can successfully run hw.exe in DosBox using the command dosbox hw.exe . In Windows XP you can run hw.exe directly.

If it's of any help, these are the environment variables related to OW on my system:

EDPATH=C:\WATCOM\EDDAT
INCLUDE=C:\WATCOM\H;C:\WATCOM\H\NT;C:\WATCOM\H\NT\DIRECTX;C:\WATCOM\H\NT\DDK
Path=...;C:\WATCOM\BINNT;C:\WATCOM\BINW;...
WATCOM=C:\WATCOM
WHTMLHELP=C:\WATCOM\BINNT\HELP
WIPFC=C:\WATCOM\WIPFC

One problem I have had in the past is that Watcom doesn't like spaces in the path. This does not appear to be your problem but I recommand you to at least eliminate it as a possible cause.

I overcame this problem by installing Watcom in a special program directory which I call Programx.

So this is what I suggest you do:

  1. Uninstall Watcom
  2. Create a subdirectory "Programx" under "C:\\"
  3. Re-install Watcom such that its root is "C:\\Programx\\Watcom"

Good luck! In case you don't already know it, Watcom produces excellent Win32 code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM