[PD] linking libs with pd-lib-builder (was Re: fluid~)

Christof Ressi info at christofressi.com
Wed Jan 6 00:51:31 CET 2021


> I still wonder if there's an easy way to just incorporate all of these 
> libs inside the external binary.
Do you mean static linking? Depends on the dependencies. Some are 
available as a static library and others are not.

In my "aoo" Pd external, I use the "opus" library, which can be built 
both as a static and shared library. My build system supports both 
dynamic and static linking for each dependency. The versions I upload on 
Deken are all linked statically (i.e. a single binary). For distribution 
via a system package manager, however, I would choose dynamic linking, 
since in that case the dependencies are supposed to be installed 
system-wide.

Personally, I strongly prefer static linking for plugins (like Pd 
externals). The downside is that you're responsible for providing the 
correct linker flags, since a static library is just an archive of 
object files. For complex dependencies, you're better off with linking 
dynamically and shipping them along side your library.

Christof

On 05.01.2021 23:35, Alexandre Torres Porres wrote:
> Em ter., 5 de jan. de 2021 às 19:28, Alexandre Torres Porres 
> <porres at gmail.com <mailto:porres at gmail.com>> escreveu:
>
>     Not that it makes that much of a difference just getting rid of
>     these two out of so many.
>
>
> I still wonder if there's an easy way to just incorporate all of these 
> libs inside the external binary. that would really make it cleaner. 
> But if we have to settle with this, it's fine also...
>
> I mean, it's been mentioned here as an alternative, but I wonder if 
> it's too much hassle and if we'll need to exchange another dozen of 
> emails until I get what I need to do... or until I give up again :)
>
> cheers
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210106/dec15036/attachment-0001.html>


More information about the Pd-list mailing list