[PD-dev] how to load shared code for libraries

Hans-Christoph Steiner hans at at.or.at
Sun Oct 2 05:37:40 CEST 2011


On Thursday, September 29, 2011 8:49 AM, "IOhannes m zmölnig"
<zmoelnig at iem.at> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 09/28/2011 03:07 PM, Hans-Christoph Steiner wrote:
> > 
> > Ah, ok, that changes things.  So you are sure there isn't a way to make
> > this work?  
> 
> on, i'm not sure. i only reported issues i came across.
> 
> > If so, do you think there are other shared library
> > techniques you think could work? 
> 
> i hope, but i do not know.
> 
> >  Otherwise, it looks like we are back
> > to my original manual dlopen() proposal.
> 
> i'm still no friend of this.
> i'm afraid that all real-life solutions that involve dlopen(), will
> require significantly more code to be crammed into each external (only
> to make this work) than will be put into the "shared code library".
> 
> which would make the entire attempt futile.

Just tested with tkwidgets on MinGW.  It works fine.  It builds a
libtkwidgets.dll, and entry.dll links against it.  And it seems that
Windows automatically looks in the same folder for other dependent DLLs.
 And Mac OS X is working using @loader_path.

So we just need to figure out GNU/Linux and we have it.  tkwidgets
builds and links to libtkwidgets.so, and if I set LD_LIBRARY_PATH before
running Pd, it finds libtkwidgets.so.  Anyone have any ideas?

.hc



More information about the Pd-dev mailing list