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

Dan Wilcox danomatika at gmail.com
Mon Jan 4 22:06:22 CET 2021


> Em sáb., 12 de dez. de 2020 às 08:17, Christof Ressi <info at christofressi.com <mailto:info at christofressi.com>> escreveu:
> Maybe it's helpful to look at pd-lib-builder, since it has an option to build a helper shared library.
> 
> Yup, I assumed pd-lib-builder could help us with things like that ;)

I don't think helper libraries are needed here, that's mainly a local library that's linked from the projects sources files and not necessarily another project. I've used a helper library for some projects where you have two executables which share some of the same classes, for instance. 

 have only used them for building another project's sources in Pd actually, not port midi and port audio, mainly to avoid their relatively slowly maintained configure scripts. 

> Em sáb., 12 de dez. de 2020 às 10:27, Dan Wilcox <danomatika at gmail.com <mailto:danomatika at gmail.com>> escreveu:
>> From: Christof Ressi <info at christofressi.com <mailto:info at christofressi.com>>
>> macOS: -install_name @loader_path/$(shared.lib)
> 
> I think this line basically says "when loading this dylib, try looking in the same folder." This would be ideal as it means the libfluidsynth.dylib just needs to sit next to fluid~.pd_darwin.
> 
> That also works for me, but I'd still prefer to generate a single larger binary with the lib included. Can we do that with pd-lib-builder?

Just run install_name_tool after building with the relevant options and files, probably via a secondary makefile target. You may need to read up on how makefiles work and the pd-lib-build docs on how the build steps are performed to find the right place to add it.*

> One way or another, I'd need to see an example of a project that does this and makes it work so I can better understand and copy the method. As it is, I only have an idea that it provides a solution, but not really how.

* see above

--------
Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210104/61d83525/attachment-0001.html>


More information about the Pd-list mailing list