link in my own library

Responder
Otto
Mensajes: 50
Registered for: 3 years 5 months
Austria

link in my own library

Mensaje 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

Avatar de Usuario
ricardo arraes
Mensajes: 87
Registered for: 3 years 5 months
Brazil

Mensaje 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
The work always comes before the belief

Cristobal
Site Admin
Mensajes: 315
Registered for: 3 years 6 months
Spain

Mensaje por Cristobal »

// {% LoadHRB( './cr1.hrb' ) %}
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces

Otto
Mensajes: 50
Registered for: 3 years 5 months
Austria

Mensaje 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

ramirezosvaldo
Mensajes: 127
Registered for: 3 years 5 months
Mexico

Mensaje por ramirezosvaldo »

Gracias

Muchas formas de "pelar un gato"

Saludos
Osvaldo Ramirez

Responder