[Gambas-user] Use of a Gambas library in a module
bagonergi at gmail.com
Tue Oct 23 15:56:43 CEST 2018
Il giorno mar 23 ott 2018 alle ore 15:04 T Lee Davidson <
t.lee.davidson at gmail.com> ha scritto:
> On 10/23/18 7:19 AM, Gianluigi wrote:
> > Hi Benoit,
> > have you tried the code in the 'Dynamic libraries' folder?
> > Have you noticed that to load the library as a component just indicate
> the path "/usr/lib/gambas3/<library name>:0" but also
> > "/foo/gambas3/<library name>:0" as indicated by Lee?
> > Have you noticed that you don't need to load the library with the IDE
> dialog but just insert the library in the project?
> > In fact it seems that if you load with the dialog then the code works
> less well (loading the combobox).
> > As you noticed if you use 'Component.Load(<library absolute path>)' the
> library will not load.
> > Best regards
> > Gianluigi
> To clarify for whomever it may concern...
> With the library located in the project folder, yes, I have loaded it by
> specifying a path (with or without full or partial
> <vendor> information) where it cannot be found, eg.
If I don't write the path like this: ".../gambas3/<library name>:0" I get
> When the library is added via the Project > Properties > Library dialog
> and its exported module is also loaded dynamically as a
> class, it has an extra symbol, namely, just a dot, ".". This shows up in
> the ComboBox that is dynamically populated from the
> symbols of the exported module that was loaded as a class (by the TestMat
> project in Gianluigi's 'Dynamic libraries' archive
> attached in a previous message).
Either you have that malfunction or you don't load the library with
Component.Load and, if I'm not mistaken, you are unable to create an
executable that works on another computer than yours. With the addition
that you cannot automatically update the library.
> I just noticed that when a library that has no vendor specified is
> compiled into an executable, the copy that is automatically
> installed is placed in "~/.local/share/gambas3/lib/(unknown)". I'm just
> curious if those parentheses are required because bash
> does not like them, "bash: syntax error near unexpected token `('"
I didn't write the name of the vendor because with this method (Dynamic
libraries) you don't need, you just need the library to be located in the
same directory as the project that uses it, and, as already mentioned, it
can be updated with another one library that has more functions
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User