[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it possible/acceptable to create a component in Gambas that depends on a shared library?
[Thread Prev] | [Thread Next]
- Subject: Re: Is it possible/acceptable to create a component in Gambas that depends on a shared library?
- From: Claus Dietrich <claus.dietrich@xxxxxxxxxx>
- Date: Fri, 6 Feb 2026 22:00:32 +0100
- To: Gambas MailingList <user@xxxxxxxxxxxxxxxxxxxxxx>
Am 06.02.26 um 21:16 schrieb Lee:
The recent thread on reading barcodes prompted me to revisit this idea.A while back I wrote a project that used "droidcam" and "zbarcam" to read barcodes using a smartphone. It works adequately, but managing each external process to make the user experience less cumbersome is more cumbersome in the code.It would be nice to be able to manage the reader directly from Gambas. But, it is even acceptable to create a component in Gambas that depends on a shared library?I see that gb.scanner relies on `scanimage`, but that is a command-line tool the existence of which is easily tested with System.Exist(). Also, I see that gb.openssl relies on the "openssl" library but that component is written in C and appears to statically link with the library.Is there a "proper" way to do what I am asking including relatively easily testing for the existence of the shared library to raise an error if it does not exist? Or is creating a component in Gambas that relies on a shared library (perhaps highly) discouraged if not prohibited?
Hi LeeI just had similar thoughts and questions. My newest class for reading QR and barcodes is using cli-tools of the zbar-tools or zxingbar-cpp-tools package. Like in the Scanners class I am testing the platform for the existence of necessary tools:
If (Not System.Exist("zbarimg")) And (Not System.Exist("ZXingReader")) Then
....
In any project you can add "libraries" an "further references" in the
project-properties-dialog. I was wondering if this would allow to bring
along all dependencies with the component. Unfortunately I haven't seen
an example or documentation about this yet.
To include packages like zbar-tools is something which is feasible in the the installer dialog (step. 5 Extra Dependencies). I am assuming that this is also usable for Gambas components.
Hope that Benoît can provide some infos and references for getting a better picture.
Best regards, Claus
| Re: Is it possible/acceptable to create a component in Gambas that depends on a shared library? | Lee <t.lee.davidson@xxxxxxxxx> |
| Is it possible/acceptable to create a component in Gambas that depends on a shared library? | Lee <t.lee.davidson@xxxxxxxxx> |