FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour compiling multiple source files
Posts: 105
Joined: Fri Jun 09, 2006 03:27 PM
compiling multiple source files
Posted: Sat Aug 04, 2007 08:21 PM

Ok...rookie question....its been so long since Ive needed to do this....
I have my source code in one large PRG file...I want to break into multiple PRG modules. How do I compile (harbour) using multiple PRG files?

thanx

Regards,

Greg Gammon
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
compiling multiple source files
Posted: Sat Aug 04, 2007 10:49 PM

Greg,

The best way to build an application with multiple PRGs is using a make file.

At FWH/makes you have bormake.zip that includes a Borland make sample and the used files to build a FWH app. There is also a msmake.zip sample in case that you want to use Microsoft make instead of Borland make.

In case that you just want to modify samples\buildh.bat or buildx.bat files to manage several PRGs (one.prg, two.prg and three.prg), then all you have to do is:

%hdir%\bin\harbour one /n /i%fwh%\include;%hdir%\include /w /p

%hdir%\bin\harbour two /n /i%fwh%\include;%hdir%\include /w /p
%hdir%\bin\harbour three /n /i%fwh%\include;%hdir%\include /w /p

%bcdir%\bin\bcc32 -M -c -O2 -I%hdir%\include one.c
%bcdir%\bin\bcc32 -M -c -O2 -I%hdir%\include two.c
%bcdir%\bin\bcc32 -M -c -O2 -I%hdir%\include three.c

echo c0w32.obj + > b32.bc

echo one.obj + >> b32.bc

echo two.obj + >> b32.bc
echo three.obj, + >> b32.bc
echo one.exe, + >> b32.bc

...

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion