need a link script or file to link

Post Reply
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

need a link script or file to link

Post by hag »

need to link a lot of prgs to create exe.
Using borland..Harbour and buildh.bat for each prg. Now I need to start to link several of them together. Soon about 100+ prgs.

Someobdy sending a script or bat file would be great. I'm lost.
Thank you
Harvey
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

Harvey,

maybe it´s better to use a simple project manager than a big batch for this job.

I suggest to use xMate, it´s a really great and easy to use tool.

You can download it at http://www.andywos.ih.co.za/xmate/
kind regards
Stefan
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Script-file for compiling

Post by ukoenig »

Hello Harvey,

you can use Stefan's solution or use
a standard-sample and change the contents.

here is the basic-structure of the script-file :

Code: Select all


1. create a batchfile :  GO.bat
----------------------------------

IF not exist obj md obj
c:\bcc55\bin\make -f PROGFILE.rmk

2. create a file PROGFILE.rmk
----------------------------------

#Borland make sample, (c) FiveTech Software 2005

# your BORLAND, HARBOUR and FWH directorys
--------------------------------------------------------

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

.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

# the list of the PRG-files ( PRG has to be uppercase )
// ------------------------------------------------------------

PRG = \
Prog1.PRG \
Prog2.PRG \
Prog3.PRG \
Prog4.PRG \
Prog5.PRG 

// the same with c-files if needed
// -----------------------------------

# C =          \
# two.C                 

PROJECT    : MYPROG.exe

// the resource-file
// -------------------

MYPROG.exe  : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) MYPROG.res
    echo off
    echo $(BCDIR)\bin\c0w32.obj + > b32.bc

# OBJ-Liste
# -------------
  echo obj\Prog1.obj \
       obj\Prog2.obj \
       obj\Prog3.obj \
       obj\Prog4.obj \
       obj\Prog5.obj, + >> b32.bc 
 
  echo MYPROG.exe, + >> b32.bc
  echo MYPROG.map, + >> b32.bc

# Fivewin Lib`s für xHARBOUR
# --------------------------------------

  echo $(FWDIR)\lib\Fivehx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   
# xHARBOUR-Lib`s
# -----------------------

  echo $(HBDIR)\lib\rtl.lib + >> b32.bc
  echo $(HBDIR)\lib\vm.lib + >> b32.bc
  echo $(HBDIR)\lib\gtgui.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\dbffpt.lib + >> b32.bc
  echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
  echo $(HBDIR)\lib\debug.lib + >> b32.bc
  echo $(HBDIR)\lib\common.lib + >> b32.bc
  echo $(HBDIR)\lib\pp.lib + >> b32.bc
  echo $(HBDIR)\lib\codepage.lib + >> b32.bc
  echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc

# Uncomment these two lines to use Advantage RDD
# echo $(HBDIR)\lib\rddads.lib + >> b32.bc
# 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\msimg32.lib + >> b32.bc
  echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc

# MYPROG.res includes Symbol ICON : favorite.ico
# it will be the EXE-symbol
# ----------------------------------------------------------	

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

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

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

MYPROG.res : MYPROG.rc
  $(BCDIR)\bin\brc32.exe -r MYPROG.rc

To compile start GO.bat

Best Regards
Uw :lol:
[/code]
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Harvey,

FiveWin provides a Borland make working example:

FWH/makes/bormake.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

Thanks for the help.
I'll try it later today and get back.

Thanks again
Thank you
Harvey
hag
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California
Contact:

Post by hag »

Thanks for the input but it doesn't work.

Please test it for me and let me know whats happening.
Using files one.prg, alert.prg.


Message i get: .PRG: not recognized etc. etc.

If I comment it out ,PRG: I get "can't find alert.exe."

code:
#Borland make sample, (c) FiveTech Software 2005

HBDIR=F:\harbour
BCDIR=c:\Borland\bcc55
FWDIR=F:\fwh

#change these paths as needed

.path.OBJ = .\obj
.path.PRG = .\
.path.CH = $(FWDIR)\include;$(HBDIR)\include
.path.C = .\
.path.rc = .\

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

PRG = \
alert.PRG \
one.PRG

# C = \
# two.C

PROJECT : Alert.exe

Alert.exe : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) Alert.res

echo off
echo $(BCDIR)\lib\c0w32.obj + > b32.bc
echo obj\alert.obj obj\one.obj, + >> b32.bc
echo alert.exe, + >> b32.bc
echo alert.map, + >> b32.bc

echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc

echo $(HBDIR)\lib\hbrtl.lib + >> b32.bc
echo $(HBDIR)\lib\hbvm.lib + >> b32.bc
echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
echo $(HBDIR)\lib\hblang.lib + >> b32.bc
echo $(HBDIR)\lib\hbmacro.lib + >> b32.bc
echo $(HBDIR)\lib\hbrdd.lib + >> b32.bc
echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
echo $(HBDIR)\lib\hbdebug.lib + >> b32.bc
echo $(HBDIR)\lib\hbcommon.lib + >> b32.bc
echo $(HBDIR)\lib\hbpp.lib + >> b32.bc
echo $(HBDIR)\lib\hbcpage.lib + >> b32.bc


#rem Uncomment these two lines to use Advantage RDD
#rem echo $(HBDIR)\lib\b32\rddads.lib + >> b32.bc
#rem echo $(HBDIR)\lib\b32\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 Alert.res echo Alert.res >> b32.bc
ECHO $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc

del b32.bc

.PRG.OBJ:

#$(HBDIR)\bin\b32\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include

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

.C.OBJ:

echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp

Alert.res : Alert.rc
$(BCDIR)\bin\brc32.exe -r Alert.rc

end code.



Thank you
Harvey
Post Reply