On Wed, 14 Aug 2013, Pritpal Bedi wrote:
Hi Pritpal,
> I am in an urgent need to compile an application
> to be run on MS-DOS. My development environment is
> Windows 7, but it can also be XP if that is the minimum
> requirement.
>
> As it is an urgent need, and I have zero experience
> for such build, I would appreciate if you provide
> complete step-by-step guidelines.
It's quite simple.
We are supporting two compilers for DOS builds:
DJGPP (
http://www.delorie.com/djgpp/, I suggest version 2.04) and
OpenWatcom (
http://www.openwatcom.org/, the last version is 1.9).
It's enough to install one of them and recompile Harbour with it.
Then you can use HBMK2 though here one problem can appear. Command
line size limitation which causes that HBMK2 does not work out of
the box with OpenWatcom DOS tools in real DOS. Anyhow OpenWatcom
can generate binaries for different systems (DOS, Windows, Linux,
OS2, ...) using platform native tools so you will not have this
problem working on Windows.
Harbour compilation is very easy. You only have to set few envvars
which are usually set also by installer though it may be easier for
you to have batch file for it if you want to use different C
compilers on the same machine. In README.md you will find details
for compilation in Windows:
```batchfile
rem Delorie GNU C for MS-DOS (on Intel 32-bit Windows hosts only)
set DJGPP=C:\djgpp\djgpp.env
set PATH=C:\djgpp\bin;%PATH%
win-make
```
```batchfile
rem Open Watcom C/C++ for MS-DOS
SET WATCOM=C:\watcom
SET PATH=%WATCOM%\BINNT;%PATH%
SET EDPATH=%WATCOM%\EDDAT
SET INCLUDE=%WATCOM%\H
win-make
```
Above variables also allow HBMK2 to detect C compiler.
best regards,
Przemek