Starting with Harbour/FWH – beginner question

Starting with Harbour/FWH – beginner question

Postby Otto » Fri Oct 05, 2007 8:38 pm

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?
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Fri Oct 05, 2007 8:57 pm

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Otto » Fri Oct 05, 2007 9:39 pm

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
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Fri Oct 05, 2007 11:15 pm

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby demont frank » Sat Oct 06, 2007 10:33 am

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
demont frank
 
Posts: 167
Joined: Thu Mar 22, 2007 11:24 am

Postby Richard Chidiak » Sat Oct 06, 2007 10:47 am

I would add

UESTUDIO

The best in my opinion,

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 53 guests