[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?


Le 06/02/2026 à 23:53, Lee a écrit :
On 2/6/26 4:00 PM, Claus Dietrich wrote:
Hope that Benoît can provide some infos and references for getting a better picture.

I think he did about 13 minutes before your mail hit the list. You probably hadn't received his post yet.

Basically, "It's not a good idea."

Oh well, at least using command-line tools, though slightly cumbersome, works.


What I meant is that you have to do at runtime what is done at compile time: before using the library, check that you have the right version on the system.

You have to maintain your code too so that it can follow the library interface. For example, if I write a component that uses QT6, I have to write code that run with any version of QT6, or at least the maximum possible versions.

If you are ready to do all that work, you can create a Gambas component that directly hit a library.

Personnaly, I prefer always write a C part that makes an interface between the library and the Gambas code. Then the C part can hide the library quirks and evolution to the Gambas part.

This is why I say "it's not a good idea".

I suggest you try to do what you want, and that you show me the result if you want my opinion.

Regards,

--
Benoît Minisini.