Page 1 of 1

Starting with Harbour/FWH – beginner question

Posted: Fri Oct 05, 2007 8:38 pm
by Otto
Hello,
Trying to convert a small application from FW to FWH I need some help.

FW/Clipper
I have a own class Tsetup which I link compile with clipper

Clipper tsetup /n

and link it this way

Lnk-file in Fivewin

FILE c:\clipper\fwlink\Tsetup.obj

How can I do this in Harbour/FWH?

Posted: Fri Oct 05, 2007 8:57 pm
by Antonio Linares
Otto,

Basically it is the same:

Harbour tsetup /n

>
and link it this way
Lnk-file in Fivewin
FILE c:\clipper\fwlink\Tsetup.obj
>

You also link TSetup.obj but using the way described in FWH\samples\buildh.bat

Posted: Fri Oct 05, 2007 9:39 pm
by Otto
Antonio,
thank you.

Where does harbour store the obj-file. I only get a file with a
c extension.

c:\xHarbour\tests>c:\xHarbour\bin\harbour tsetup /n
xHarbour Compiler build 0.99.71 (SimpLex)
Copyright 1999-2007, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tsetup.prg'...
Lines 59, Functions/Procedures 4
Generating C source output to 'tsetup.c'...

Would you be so kind to insert the line with the tsetu.obj in
the following rmk-file.

#Borland make sample, (c) FiveTech Software 2005

HBDIR=c:\xharbour
BCDIR=c:\bcc55
FWDIR=c:\fwh

#change these paths as needed
.path.PRG = .\
.path.OBJ = .\obj
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG = \
Kasse.PRG

PROJECT : kasse.exe

kasse.exe : $(PRG:.PRG=.OBJ)
echo off
echo $(BCDIR)\bin\c0w32.obj + > b32.bc
echo obj\kasse.obj, + >> b32.bc
echo xKasse.exe, + >> b32.bc
echo xKasse.map, + >> b32.bc
echo $(FWDIR)\lib\FiveHX.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
echo $(HBDIR)\lib\rtl.lib + >> b32.bc
echo $(HBDIR)\lib\vm.lib + >> b32.bc
echo $(HBDIR)\lib\gtwin.lib + >> b32.bc
echo $(HBDIR)\lib\lang.lib + >> b32.bc
echo $(HBDIR)\lib\macro.lib + >> b32.bc
echo $(HBDIR)\lib\rdd.lib + >> b32.bc
echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
echo $(HBDIR)\lib\debug.lib + >> b32.bc
echo $(HBDIR)\lib\common.lib + >> b32.bc
echo $(HBDIR)\lib\pp.lib + >> b32.bc
rem echo $(HBDIR)\lib\codepage.lib + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo $(HBDIR)\lib\rddads.lib + >> b32.bc
rem echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

echo $(BCDIR)\lib\cw32.lib + >> b32.bc
echo $(BCDIR)\lib\import32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc

IF EXIST xKasse.res echo xKasse.res >> b32.bc
$(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
del b32.bc

.PRG.OBJ:
$(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c


Thank in advance
Otto

Posted: Fri Oct 05, 2007 11:15 pm
by Antonio Linares
Otto,

Harbour generates an intermediate C file that has to be compiled using the free Borland C compiler. Please review samples\buildh.bat and you will see how bcc32.exe is called to compile the C file.

echo obj\kasse.obj tsetu.obj, + >> b32.bc

Posted: Sat Oct 06, 2007 10:33 am
by demont frank
Otto,

Since we have builders , i do not use bat file anymore.

Using a builder take care off all elements from the build process
We have very good builders as :

hbmake (part from xharbour)
xbuild (demo version or commercial)
xmate , very good , can be used with many compilers , also clipper !

Frank

Posted: Sat Oct 06, 2007 10:47 am
by Richard Chidiak
I would add

UESTUDIO

The best in my opinion,

Richard