how to link prg files in mod harbour

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

how to link prg files in mod harbour

Postby Otto » Thu Aug 08, 2019 2:08 pm

From slack

Otto Atzwanger 15:06 Uhr
Antonio, can you please tell me how I link in different prg files in mod harbour.
I mean if I have a prg with universal functions in it how do I access this prg file from my index.prg.

Antonio Linares 15:08 Uhr
Otto compile it as a HRB file then as the first line of your PRG write this:

much better... review samples/plugin.prg
thats the working example
// {% LoadHRB( "testhrb.hrb" ) %}function Another() Test()return nil

Otto Atzwanger 15:14 Uhr
I do not know what hrb is.
BTW is compiled code working even faster?

Antonio Linares 15:15 Uhr
When you compile a PRG you can tell Harbour to generate a HRB file instead of a C file
yes, much faster
Charly has done some tests and from 200 milliseconds, when we use HRB files, we reach 2 milliseconds only
also it has the advantage that there are no errors
if Harbour generates a HRB file then it means the syntax, everything, is correct
Please test mod_harbour/samples/testhrb.prg and testhrb.hrb
it is the same code, as PRG and as HRB
to generate a HRB file we do (it is explained inside testhrb.prg)
harbour -gh -n testhrb.prg
A HRB file is a binary file that contains the local symbol table and the pcode, already compiled and ready to be used
mod_harbour supports HRB files, same as PRGs
this way developers can protect their code

Thank you Antonio and best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 5 guests