[Gambas-user] Use of a Gambas library in a module

Gianluigi bagonergi at gmail.com
Mon Oct 22 16:46:02 CEST 2018


Hi Hans,
I attach the Dynamic libraries folder that contains the Mathematical
Library Project that initially does only two operations (sum and
subtraction).
With the method already explained above I use the library in TestMat.
I create the TestMat executable (see LibTwo folder) that works using the
library (if present in the same folder).
Extending the Mat library with two other operations (multiplication and
division), the TestMat executable updates automatically (see LibFour
folder).

Regards
Gianluigi

Il giorno dom 21 ott 2018 alle ore 22:31 Gianluigi <bagonergi at gmail.com> ha
scritto:

> Hans, Lee,
> this attached code, here works.
>
> Regards
> Gianluigi
>
> Il giorno dom 21 ott 2018 alle ore 20:48 T Lee Davidson <
> t.lee.davidson at gmail.com> ha scritto:
>
>> Actually, "/usr/lib/gambas3/" would be the *system* path where all the
>> components are stored. You get that particular path
>> string with Component.Path.
>>
>> When you make an executable of a library (in this case resulting in
>> "myLibrary.gambas"), a copy is also automatically placed in
>> the *user* path:
>> <Desktop.DataDir>/gambas3/lib/<vendor_name>/<file_name> (filename in this
>> case is "myLibrary:0.0.gambas").
>>
>>
>> ___
>> Lee
>>
>>
>> On 10/21/18 10:42 AM, Gianluigi wrote:
>> > As suggested by Benoit and Jussi, the Library should be copied inside
>> the project, then in Sub Open you writs:
>> >
>> >   Dim sPath As String
>> >   sPath = "/usr/lib/gambas3/myLibrary:0"
>> >   Component.Load(sPath)
>> >
>> > and with help from this lesson [0], completes the project.
>> >
>> > Regards
>> > Gianluigi
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181022/781b7dbf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dinamic libraries.tar.xz
Type: application/x-xz
Size: 14596 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181022/781b7dbf/attachment.xz>


More information about the User mailing list