> > has anybody been successful in creating (and loading/using, obviously) > externals for a Pd-host compiled with PDINSTANCE/PDTHREADS?
My only real experience with PDINSTANCE/PDTHREADS is on Android/iOS apps, where externals are statically linked and loaded at startup (calling *_setup()). I think iOS doesn't allow you to load dynamic libs anyway. However, I have wondered whether it might be possible, in the future, to achieve a convergence between multiple-instance and single-instance code. That is: always compile libpd with PDINSTANCE/PDTHREADS flags (then just remove them), and the same for Pd. I think the overhead is negligible. Antoine Le lun. 29 juin 2026 à 13:46, IOhannes m zmoelnig via Pd-dev < [email protected]> a écrit : > On 6/29/26 13:15, IOhannes m zmoelnig via Pd-dev wrote: > > the two things to take care of that I know of are: > > - using data that is static (or otherwise shared between threads) > > obviously needs special handling. > > - the convenience static variables exported by Pd ("s_float" and > > friends) should be replaced with explicitly generated symbols > (gensym(...)) > > > > > > anything else I am missing? > > > > > of course, my tests were conducted on linux (with a recent Pd). > > things start falling apart when trying to build on Windows > > ld.exe > (.rdata$.refptr.__emutls_v.pd_this[.refptr.__emutls_v.pd_this]+0x0): > undefined reference to `__emutls_v.pd_this' > > and on macOS: > > ld: illegal thread local variable reference to regular symbol _pd_this > > > afaict, the Windows issue is mainly because I built against Pd-0.54-1, > ra ther than Pd>=0.55-0 (which contains [c3497b77]). > > i haven't checked what the problem is on macOS, but the root cause > (according to [34212217]) appears to be similar to what christof fixed > for windows in [c3497b77]. > > has anybody been successful in creating (and loading/using, obviously) > externals for a Pd-host compiled with PDINSTANCE/PDTHREADS? > > > mgfdas > IOhannes > > > [c3497b77] > < > https://github.com/pure-data/pure-data/commit/c3497b77021cfedba790dbba393672e2056967bf > > > > [34212217] <https://stackoverflow.com/questions/34212217/> > > -- > please do not CC me for list-emails > > --- > [email protected] - the Pd developers' mailinglist > > https://lists.iem.at/hyperkitty/list/[email protected]/message/NDAPBUVPSWISWMYD3MC6MCXVE7K4QGSL/
--- [email protected] - the Pd developers' mailinglist https://lists.iem.at/hyperkitty/list/[email protected]/message/4KWS427PKWYGH2AQLDIJBNXXT4HF3QOH/
