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

Christof Ressi info at christofressi.com
Wed Jan 6 03:54:28 CET 2021


> I see, how can we know and how about these from fluidsynth?

https://github.com/FluidSynth/fluidsynth/blob/e04cd572cb1ad177519b8e94f27d7be52c074c62/CMakeLists.txt#L62

The existence of the "BUILD_SHARED_LIBS" option implies that it *should* 
be possible to build fluidsynth as a static library.

That being said, if fluidsynth itself depends on external (shared) 
libraries, the original problem persists, because you still would need 
to link the final binary with those libraries - or make them static as 
well. Etc.

---

> I guess I may have come across a complex system with over a dozen libs 
> :/ so if I get things straight, we're better off just keeping it that way?
I think so.

Christof

On 06.01.2021 03:39, Alexandre Torres Porres wrote:
>
>
> Em ter., 5 de jan. de 2021 às 20:53, Christof Ressi 
> <info at christofressi.com <mailto:info at christofressi.com>> escreveu:
>
>>     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?
>
>
> guess so :)
>
>     Depends on the dependencies. Some are available as a static
>     library and others are not.
>
>
> I see, how can we know and how about these from fluidsynth?
>
>     Personally, I strongly prefer static linking for plugins (like Pd
>     externals).
>
> seems best for me too!
>
>     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.
>
> I guess I may have come across a complex system with over a dozen libs 
> :/ so if I get things straight, we're better off just keeping it that way?
>
> cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210106/3047b6d4/attachment.html>


More information about the Pd-list mailing list