The question is better answered by informing yourself of how dynamic libraries are found by applications on the platform, in this case macOS.
As far as I know, it basically comes down to:
See the docs:
https://developer.apple.com/library/archive/documentation/DeveloperTools/Con... https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/UsingDynamicLibraries.html#//apple_ref/doc/uid/TP40002182-SW10
or
https://developer.apple.com/library/archive/documentation/DeveloperTools/Con... https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html
or lots of posts on SO like
https://stackoverflow.com/questions/38685581/how-to-set-dylib-search-path-os... https://stackoverflow.com/questions/38685581/how-to-set-dylib-search-path-osx
For distributing a plugin like an external via deken, options 1-3 are probably out to some degree. Option 4 however is not easy either as the path set by install_name_tool has to be relatively specific, in my experience. Getting it to work with the dylib sitting "wherever" on someone else machine is not so easy, unfortunately.
Gem makes this work, so I would check how they do it for macOS.
The other, simpler alternative is to statically link fluidsynth into the external. You then have a larger pd_darwin but no dependencies or dylib search paths. If homebrew installs a statically-built libfluidsynth.a to /usr/local/lib, you can use that.
On Dec 12, 2020, at 2:29 AM, pd-list-request@lists.iem.at wrote:
Message: 3 Date: Fri, 11 Dec 2020 22:28:33 -0300 From: Alexandre Torres Porres <porres@gmail.com mailto:porres@gmail.com> To: Esteban Viveros <emviveros@gmail.com mailto:emviveros@gmail.com> Cc: Jonathan Wilkes <jancsika@yahoo.com mailto:jancsika@yahoo.com>, Pd-List <pd-list@lists.iem.at mailto:pd-list@lists.iem.at> Subject: Re: [PD] fluid~ Message-ID: <CAEAsFmh701xsCJ8g95+Tt1=6FE-68kHeHsjdw3shLffQJLT75Q@mail.gmail.com mailto:CAEAsFmh701xsCJ8g95+Tt1=6FE-68kHeHsjdw3shLffQJLT75Q@mail.gmail.com> Content-Type: text/plain; charset="utf-8"
my searching app failed me, I found libfluidsynth.2.dylib in Contents/lib in Purr Data's app!
So yeah, the question still remains, how can we make Pd find this. It failed to do so if it's just in the same folder. And also if we can build the external binary that already has libfluidsynth.2.dylib embedded in it.
cheers
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/