Página 1 de 1

link in my own library

Publicado: Mié Abr 14, 2021 8:42 am
por Otto
Hello friends,

Can you please advise me on how I can link in my library or prg-files?
Should we link in compiled files or plain prg files?

Best regards,
Otto

Re: link in my own library

Publicado: Mié Abr 14, 2021 1:36 pm
por ricardo arraes
Hey Otto!

how you doing?

I usually call for:

Código: Seleccionar todo

{% LoadFile( "/src/function/functions.prg" ) %}
...whenever I want to attach some files or avoid duplicated code.

*This is a mercury function

Re: link in my own library

Publicado: Mié Abr 14, 2021 2:10 pm
por Cristobal
// {% LoadHRB( './cr1.hrb' ) %}

Re: link in my own library

Publicado: Mié Abr 14, 2021 3:04 pm
por Otto
Cristobal, Ricardo, thank you so much.
I also got some help from Antonio - I post this, too.
Best regards,
Otto

From FIVEWIN mod harbour forum:
Antonio Linares answered:

How to include into mod harbour?
-------------------------------------------------------------------------------------------------------

You have to include your PRGs (or libraries) filenames in modharbour.hbp
https://github.com/FiveTechSoft/mod_har ... arbour.hbp

in apache.prg add your functions names as "extern"
https://github.com/FiveTechSoft/mod_har ... apache.prg

Finally run go64.bat and you will get your mod_harbour with your extra PRGs (or libraries) built in
https://github.com/FiveTechSoft/mod_har ... s/go64.bat


How do I only include an external file for a single project without changing APACHE?
-------------------------------------------------------------------------------------------------------

You may use:

#include "myfile.prg"

better place it at the bottom of your main PRG

Re: link in my own library

Publicado: Mié Abr 14, 2021 8:41 pm
por ramirezosvaldo
Gracias

Muchas formas de "pelar un gato"

Saludos
Osvaldo Ramirez