[PD] declare not posting library loading message while object creation does?

Antoine Rousseau antoine at metalu.net
Mon Oct 7 15:34:20 CEST 2019


[declare -lib] can be useful with certain kind of (homemade) externals,
where you have to ensure that a given class is declared before
instantiating an object which itself refers to this class.

Le lun. 7 oct. 2019 à 15:08, Christof Ressi <christof.ressi at gmx.at> a
écrit :

> Hey,
>
> > but only if the external is within a given serach path on PD startup.
>
> Which is also true for [declare -lib] - it can't magically find libraries
> without having the correct search paths. Note that for every external "foo"
> the loader also tries "foo/foo", so [declare -path hid] is not necessary,
> you can just do [hid]. I don't see any purpose for [declare -lib hid]
> except maybe for documentation (but then I would just write a comment).
>
> > > i guess Peter was saying that he only loads libraries/externals
> > explicitly when they are needed.
>
> I don't get it. When I do [hid] - without [declare -lib] -, it will be
> exactly loaded when needed.
>
> Christof
>
> > Gesendet: Montag, 07. Oktober 2019 um 14:50 Uhr
> > Von: "oliver" <oliver at klingt.org>
> > An: Pd-list <pd-list at mail.iem.at>
> > Betreff: Re: [PD] declare not posting library loading message while
> object creation does?
> >
> > Christof Ressi wrote:
> > >> And this was sarcasm too.
> > >
> > > damn, my sarcasm-O-meter failed miserably...
> > >
> > >> I was using [declare -lib hid] because this is how I load libraries
> in general.
> > >
> > > "-lib" is only needed for multi-object-per-binary libraries, e.g. zexy
> and iemlib. [declare -lib hid] doesn't do anything useful, the external
> will be loaded anyway when you create it the first time...
> > >
> >
> > but only if the external is within a given serach path on PD startup.
> >
> > i guess Peter was saying that he only loads libraries/externals
> > explicitly when they are needed. (which is a good practice for testing
> > purposes or prior to posting/sharing patches)
> >
> > in the case of [hid] (or [hidin] on windows) it would be [declare -path
> > hid] though, since (as christof correctly said) it's a single external
> > rather than a multiobject library (like ZEXY, IEMLIB, IEMMATRIX, GEM).
> >
> > best
> >
> > oliver
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Pd-list at lists.iem.at mailing list
> > UNSUBSCRIBE and account-management ->
> https://lists.puredata.info/listinfo/pd-list
> >
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> https://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20191007/70bf7525/attachment.html>


More information about the Pd-list mailing list