compiling multiple source files

compiling multiple source files

Postby Greg Gammon » Sat Aug 04, 2007 8: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
User avatar
Greg Gammon
 
Posts: 105
Joined: Fri Jun 09, 2006 3:27 pm
Location: Bryan, Texas

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests