(fixing subject line I forgot in previous email)

I forgot to mention that my response was directed more for macOS and possibly 
Windows where asking people to use a package manager is a bit more of a stretch 
as opposed to Linux. In general, dependent libs are packaged with the program 
itself and sometimes dynamic linking can be problematic, ie. on macOS you often 
have to (re)set the rpath in a built lib. That dance in avoided by simply 
statically linking at the expense of binary size. I'm not saying it's the best 
solution, but it may be more maintainable and usable in the case of a 
dynamically-loaded Pd external.

OTOH I believe GEM provides dynamic libs along with the externals on macOS but 
this most probably requires fiddling with the rpath, basically overriding the 
search path for the lib to it's found in a different, non-system location.

For Windows, if I recall correctly, you generally just need to place the dlls 
next to whatever is using them.

As for mixing static and dynamic linking, I believe that's not a problem as 
long as the dynamic libs are found.

> On May 4, 2022, at 12:06 AM, [email protected] wrote:
> 
> Message: 2
> Date: Tue, 03 May 2022 23:53:26 +0200
> From: Roman Haefeli <[email protected] <mailto:[email protected]>>
> To: [email protected] <mailto:[email protected]>
> Subject: Re: [PD-dev] Pd-dev Digest, Vol 204, Issue 11
> Message-ID: <[email protected] 
> <mailto:[email protected]>>
> Content-Type: text/plain; charset="utf-8"
> 
> On Tue, 2022-05-03 at 23:29 +0200, Dan Wilcox wrote:
>> My two cents: I have tried in the past to bundle dynamic libs
>> generated/downloaded by homebrew into app distributions to run on
>> other systems and *always* run into problems. It hs always been
>> simpler to statically link, either to the home-brew lib or by
>> building the lib(s) myself using a script or makefile. For longer
>> term projects, I generally prefer to automate building the lib
>> statically then linking it directly into the program.
> 
> THanks for your insight.
> 
> Please forgive the noob question, but do I have static builds of all
> the dependencies available for that to work? And if I don't, do I have
> to compile the dependencies  and make sure they're built statically
> (which isn't always obvious to me with the various build systems). 
> 
> Roman

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



_______________________________________________
Pd-dev mailing list
[email protected]
https://lists.puredata.info/listinfo/pd-dev

Reply via email to