Hey, I also tried static linking a single ELSE object (impseq~.c) by adding it to my plugin's sources and calling its setup function. The result was the same _pd_this and _nullfn errors. This suggests the problem may not be dynamic loading. Does anyone have/know of a working example of building libpd with -DPDINSTANCE on macOS that exports all symbols needed by externals one way or another for a desktop application that I could look at?
thanks Em sex., 20 de mar. de 2026 às 14:18, Alexandre Torres Porres < [email protected]> escreveu: > Hi, I’m working on a VCV Rack module that runs Pd via libpd and I wanna > add ELSE externals. This is a desktop application for those unaware. > > > I Stripped down the original Prototype module to Pd-only, Pd support was > added by CHAIR (Max Neupert and Clemens), then I Ported to VCV Rack 2 API, > built libpd with multi-instance support and enabled having many modules > running Pd. It successfully loads Pd patches, audio I/O works, > knobs/switches/lights work at least with one of the examples, I’m diving > into it. Check https://github.com/porres/VCV-PureData > > > ELSE builds fine in PlugData via pdlib but Tim told me that’s tricky and > that I could start by simply using [declare] and using externals just like > in the regular Pd, but that’s not working… I first got errors like symbol > not found: _s_list and _nullfn. > > > So I did some research and recompiled ELSE with -DPDINSTANCE to match my > multi-instance libpd as it seemed needed. Result: error changed to symbol > not found: _pd_this and still _nullfn. The binaries did not work as well on > the regular Pd app on my desktop. > > > So I added -Wl,-export_dynamic to libpd build and plugin LDFLAGS. Result: > same _pd_this and _nullfn errors persist. > > > Can anyone shed me some light on this? This is the first time ever I am > trying to work with libpd myself… > > > > Would static linking (like PlugData does, which is notably harder) the > only reliable approach for me? If so, why? > > > thanks in advance > > cheers >
--- [email protected] - the Pd developers' mailinglist https://lists.iem.at/hyperkitty/list/[email protected]/message/6CAQV5BDFDALTWCKYBCHYBKP26E4VSIK/
