Special Instructions for OpenWatcom C compiler
==============================================

Created by DF7BE

   $Id: OpenWatcom.txt 3038 2021-12-30 22:54:34Z df7be $


Valid for Version :
-------------------

C:\hwgui\hwgui-ow>wcc386
Open Watcom C x86 32-bit Optimizing Compiler
Version 2.0 beta Dec 30 2021 00:29:25 (32-bit)

Tested with Windows 10, 64 bit (x86_64)

(Do not use older versions. they have bugs !)

Download from
https://github.com/open-watcom



Creating a "portable" Version of OpenWatcom
===========================================
(so it is no need to make modifications on the Windows system).

You need 7zip to extract the archive with Open Watcom binaries and includes.
  
Download file "ow-snapshot.tar.gz" from github (Archive with collection of binaries).

- Create install directory C:\WATCOM (default installation path).
- Extract archive "ow-snapshot.tar.gz" into a temporary directory.
- Move or copy the following directories to install directory:
   - binnt   (32bit) 
   - binnt64 (64bit)
   - eddat
   - l
   - lh
   - lib386
   
But you can also extract the complete archive here.
 
Prerequisites
=============

You need GNU make, install it in c:\make.
The binary "make.exe" must be found in subdir "bin".
   
   
Set Environment for all following steps   
=======================================

Modify script to your own needs.

Call environment script:
samples\dev\env\pfad_wc.bat

(needed for all following steps).



Build Harbour
=============

Default installation directory is: C:\Harbour_wc\core-master


Start build by enter
make

If the build process crashes with error E060,
you used an old version of the OpenWatcom compiler.
(See appendix).
Please install the newest release !



Build HWGUI
===========
- Modify "make_w32.bat" to your own needs.
- Start by enter 
  make_w32.bat

One Warning "W303" can be ignored.


Build a HWGUI sample 
====================
(in directory "samples")
  
hbmk.bat dbview.prg

Use this script as a sample to build your own app.
If resources do not appear, the Manifest file could have errors.


Appendix:
=========

Full error message building Harbour with old buggy release of OpenWatcom:

C:\Harbour_wc\core-master\bin\win\watcom\hbmk2 -quiet -width=0 -autohbm- @hbpre -inc hbrun/hbrun.hbp @hbpost
Error! E060: Can't find file "../../package/harbour.ico".
Error! E060: Can't find file "../../package/harbour.mft".
Error! E024: Error reading temporary file "Temporary file 1 (res)": .
hbmk2[hbrun]: Error: Running resource compiler. 8
hbmk2[hbrun]: Exit status: 6: failed in compilation (Harbour, C compiler, Resource compiler)
! Finished package build...
make[1]: *** [first] Error 6
make: *** [contrib] Error 2

* ============== EOF of OpenWatcom.txt ==================
