>copy config/w32/owatcom.cf to config/os2/owatcom.cf
>and update it for OS2 builds. At least these lines should be changed:
>[19]: CPPFLAGS = -w2 -d1 -zq -bt=NT
>[56]: echo @%watcom%/binnt/wlink.lnk >> __link__.tmp
>[57]: echo LIB kernel32.lib, user32.lib, wsock32.lib, winspool.lib,
>oleaut32.lib, uuid.lib, comctl32.lib, mapi32.lib >> __link__.tmp
>[62]: LDFLAGS = debug all OP osn=NT OP stack=65536 OP CASEEXACT

>for OS2 builds. You will have to update -bt=NT and osn=NT,
>directory with wlink.lnk (or maybe you can remove this line) and
>library list. I suggest to start with removing lines 56 and 57 and then
>try to add libraries if linker will report unresolved dependencies.
>But 1-st Harbour will have to be updated for clean compilation.
>I expect that you will see some errors. Please report them.
>To compile Harbour set:

>   rem update this path to real OpenWatcom location
>   set WATCOM=C:\LNG\WATCOM
>   rem In OS2 probably BINW and BINNT have different name, please check
>   set PATH=%WATCOM%\BINW;%PATH%
>   set INCLUDE=%WATCOM%\H;%WATCOM%\H\OS2
>
>   set HB_ARCHITECTURE=OS2
>   set HB_COMPILER=owatcom

>and then use GNU make to build harbour just like for GCC builds.

Przemek:

This is the first try of Harbour-OS/2-OpenWatcom 1.7

My OpenWatcom environment settings:
-------------------------
@ECHO OFF
SET WATCOM=E:\WATCOM
SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%PATH%
SET BEGINLIBPATH=%WATCOM%\BINP\DLL
SET EDPATH=%WATCOM%\EDDAT
SET INCLUDE=%WATCOM%\H\OS2;%WATCOM%\H
REM SET LIB=
SET HELP=%WATCOM%\BINP\HELP;%HELP%
SET BOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF%

Rem Named Pipes debug
Rem RUN=%WATCOM%\BINP\NMPBIND.EXE
-------------------------

My reduced make_ow.cmd:
-------------------------
set HB_ARCHITECTURE=os2
set HB_COMPILER=owatcom
set HB_GT_LIB=

set C_USR=-DHB_FM_STATISTICS_OFF

set HB_BIN_INSTALL=\harbour810\harbourow\bin\
set HB_LIB_INSTALL=\harbour810\harbourow\lib\
set HB_INC_INSTALL=\harbour810\harbourow\include\

   make -r %1 %2 %3 %4 %5 %6 %7 %8 %9 > make_ow.log
-------------------------

and for config\os2\owatcom.cf:

>[19]: CPPFLAGS = -w2 -d1 -zq -bt=NT

-bt=OS2

>[56]: echo @%watcom%/binnt/wlink.lnk >> __link__.tmp

For now is excluded

If included, should be used SYSTEM directive and which value ?

------------------------
For each executable file format that can be created using the Open Watcom
 Linker, a specific SYSTEM directive may be used.  The SYSTEM directive
selects a subset of the available directives necessary to create each
specific executable file format.

System
Description

[...]
os2
16-bit x86 OS/2 executable

os2_dll
16-bit x86 OS/2 Dynamic Link Library

os2_pm
16-bit x86 OS/2 Presentation Manager executable

os2v2
32-bit x86 OS/2 executable

os2v2_dll
32-bit x86 OS/2 Dynamic Link Library

os2v2_pm
32-bit x86 OS/2 Presentation Manager executable

[...]

windows
16-bit x86 Windows 3.x executable

windows_dll
16-bit x86 Windows 3.x Dynamic Link Library

win_vxd
32-bit x86 Windows 3.x or 9x Virtual Device Driver

win95
32-bit x86 Windows 9x executable

win95 dll
32-bit x86 Windows 9x Dynamic Link Library

nt
32-bit x86 Windows NT character-mode executable

nt_win
32-bit x86 Windows NT windowed executable

win32
synonym for "nt_win"

nt_dll
32-bit x86 Windows NT Dynamic Link Library

win386
32-bit x86 Open Watcom extended Windows 3.x executable or Dynamic Link Library

The various systems that we have listed above are defined in special linker directive files which are plain ASCII text files that you can edit. These files are called wlink.lnk and wlsystem.lnk.

The file wlink.lnk is a special linker directive file that is automatically processed by the Open Watcom Linker before processing any other directives. On a DOS, OS/2, or Windows-hosted system, this file must be located in one of the paths specified in the PATH environment variable. On a QNX-hosted system, this file should be located in the /etc directory. A default version of this file is located in the \watcom\binw directory on DOS-hosted systems, the \watcom\binp directory on OS/2-hosted systems, the /etc directory on QNX-hosted systems, and the \watcom\binnt directory on Windows 95 or Windows NT-hosted systems. Note that the file wlink.lnk includes the file wlsystem.lnk which is located in the \watcom\binw directory on DOS, OS/2, or Windows-hosted systems and the /etc directory on QNX-hosted systems.

The files wlink.lnk and wlsystem.lnk reference the WATCOM environment variable which must be set to the directory in which you installed your software.

In the following sections, we show some of the typical directives that you might use to create a particular executable file format. The common directives are described in the chapter entitled Linker Directives and Options. They are "common" in the sense that they may be used with any executable format. There are other, less general, directives that may be specified for a particular executable format. In each of the following sections, we refer you to chapters in which you will find more information on the directives available with the executable format used.

At this point, it should be noted that various systems have adopted particular executable file formats. For example, both the Tenberry Software DOS/4G(W) and FlashTek DOS extenders support one of the OS/2 executable file formats. It is for this reason that you may find that we direct you to a chapter which would, at first glance, seem unrelated to the executable file format in which you are interested.

To summarize, the steps that you should follow to learn about creating a particular executable are:

1.Look for a section in this chapter that describes the executable format in which you are interested.

2.See the chapter entitled Linker Directives and Options for a description of the common directives.

3.If you require additional information, see also the chapter to which we have referred you.

4.Also check the Open Watcom C/C++ Programmer's Guide or Open Watcom FORTRAN 77 Programmer's Guide for more information on creating specific types of applications.

------------------------


>[57]: echo LIB kernel32.lib, user32.lib, wsock32.lib, winspool.lib,
>oleaut32.lib, uuid.lib, comctl32.lib, mapi32.lib >> __link__.tmp

Excluded

>[62]: LDFLAGS = debug all OP osn=NT OP stack=65536 OP CASEEXACT

osn excluded. OpenWatcom should define one based in platform

Rest of os2\owatcom.cf untouched

As expected, there are many errors at build time

Just 6 libraries are created:
----------------
 1/11/08  5:17a        20,480      0 a---  hbclipsm.lib
 1/11/08  5:16a       124,928      0 a---  hbcpage.lib
 1/11/08  5:17a        20,480      0 a---  hbgt.lib
 1/11/08  5:16a       299,520      0 a---  hblang.lib
 1/11/08  5:16a       182,784      0 a---  hbpcre.lib
 1/11/08  5:16a        89,600      0 a---  hbzlib.lib
----------------

Some errors found in make_ow.log are for example:

----------------------
make[3]: Entering directory `/harbour810/harbour/source/common/os2/owatcom'
wpp386   -DHB_FM_STATISTICS_OFF  ../../hbfsapi.c -fo=hbfsapi.obj
wpp386   -DHB_FM_STATISTICS_OFF  ../../hbfopen.c -fo=hbfopen.obj
wpp386   -DHB_FM_STATISTICS_OFF  ../../hbgete.c -fo=hbgete.obj
../../hbgete.c(93): Error! E473: col(21) function argument(s) do not match those in prototype ../../hbgete.c(93): Note! N392: col(21) definition: 'unsigned long syscall DosScanEnv( char const *, char * * )' ../../hbgete.c(93): Note! N643: col(21) cannot convert argument 2 defined in: ../../hbgete.c(93) (col 40) ../../hbgete.c(93): Note! N630: col(21) source conversion type is 'char const * *'
../../hbgete.c(93): Note! N631: col(21) target conversion type is 'char * *'
../../hbgete.c(128): Error! E473: col(21) function argument(s) do not match those in prototype ../../hbgete.c(128): Note! N392: col(21) definition: 'unsigned long syscall DosScanEnv( char const *, char * * )' ../../hbgete.c(128): Note! N643: col(21) cannot convert argument 2 defined in: ../../hbgete.c(128) (col 40) ../../hbgete.c(128): Note! N630: col(21) source conversion type is 'char const * *' ../../hbgete.c(128): Note! N631: col(21) target conversion type is 'char * *'
make[3]: Leaving directory `/harbour810/harbour/source/common/os2/owatcom'
make[2]: Leaving directory `/harbour810/harbour/source/common'
----------------------


make_ow.log are 118,591 bytes, 1813 lines long

Where can I send it to you ?

David Macias


_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to