[Gambas-user] I am trying to access a gambas library from a gambas script file. How Too?

Brian G brian at westwoodsvcs.com
Tue Feb 11 21:18:01 CET 2020


I am not sure how it works, The documents say there is a path depending upon if it is global shared or private. I was able to use it inside ide app from the global location. 

I have written a lib for some functions i needed for a project I am working on. 

I have converted it to a component which is working. 
After trying to get it working even updating the scripter to allow the keyword lib for libraries and create an entry into the project file. 
The compiler does not complain about it but does seem to ignore it as there is no output from the compiler to the .startup. 

The .startup file with my global library seems to just have the lib name :xxxx:1.0 in the .startup with no path. It looks like the runtime searches for the library in the different locations listed in the documentation. 

I am not sure what the compiler is looking for. 
I include an example of a script that needs the library, and a component install and library install 

hope this helps 

Thank You 
Brian G 


From: "Fabien Bodard" <gambas.fr at gmail.com> 
To: "Gambas mailing list" <user at lists.gambas-basic.org> 
Sent: Monday, February 10, 2020 10:29:39 AM 
Subject: Re: [Gambas-user] I am trying to access a gambas library from a gambas script file. How Too? 

Hum remember that the library must be in the same path than the executable. 
Maybe the scripter must generate a symlink in the executable path stored in the temp dir. Can you send me a sample of what you are doing so I can do some tests. 

Le jeu. 6 févr. 2020 à 04:54, Brian G < [ mailto:brian at westwoodsvcs.com | brian at westwoodsvcs.com ] > a écrit : 



I did make it a component, works well the component page needs updated too. 
I did change gbs3 code to allow lib directive it now creates the project file correctly. But the compiler still does not see the exports. 
Posted a copy to bugtracker with a request . Maybe? 

thank you 
brian 




On Sun, Feb 2, 2020 at 11:28 PM -0800, "Fabien Bodard" < [ mailto:gambas.fr at gmail.com | gambas.fr at gmail.com ] > wrote: 


BQ_BEGIN

When gb script was written the library way was not in use so we ve. Not implemented it. Well maybe it's time \uD83D\uDE0A 

Le lun. 3 févr. 2020 à 01:14, T Lee Davidson < [ mailto:t.lee.davidson at gmail.com | t.lee.davidson at gmail.com ] > a écrit : 

BQ_BEGIN
On 2/2/20 6:06 PM, Brian G wrote: 
> I am trying to access some Gambas libraries from a Gambas script and just don't see how to do that anywhere. 
> 
> I am able to access and use inside gambas projects from the IDE, no issues there. 
> 
> Does anyone have any experience with this? 
> 
> I could make it a component and did try that but can't find the right name to use for the component created! 
> 
> Any help would be very appreciated 
> 
> Thank You 
> Brian G 

No experience with that. But, maybe this will help? 
[ http://gambaswiki.org/wiki/lang/include | http://gambaswiki.org/wiki/lang/include ] 


-- 
Lee 

----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- 




BQ_END


----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]---- 

BQ_END



----[ http://gambaswiki.org/wiki/doc/netiquette ]---- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200211/cb7d2126/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: westwood-sharedmem_3.14.60-0ubuntu1_all.deb
Type: application/x-deb
Size: 59200 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200211/cb7d2126/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gambas3-westwood-sharedmem-qt5_3.14.60-0ubuntu1_all.deb
Type: application/x-deb
Size: 1584 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200211/cb7d2126/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Samplescripts
Type: application/octet-stream
Size: 1728 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200211/cb7d2126/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SampleScriptBG
Type: application/octet-stream
Size: 923 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200211/cb7d2126/attachment-0003.obj>


More information about the User mailing list