[PD] general libdir question

Hans-Christoph Steiner hans at eds.org
Tue Jan 30 00:41:54 CET 2007


On Jan 29, 2007, at 2:21 PM, Georg Holzmann wrote:

> Hallo!
>
>>> Okay, but when I start pd -lib libdir and then make an [import  
>>> iemmatrix] I get the message:
>>>     libdir_loader: added iemmatrix to the canvas-local path
>>>     [import] loaded library: iemmatrix
>>> but I cannot use [mtx_add], only [iemmatrix/mtx_add]
> [...]
>> Yeah, same for me.  I don't have time to look at this right now.   
>> I've barely tried the Pd-0.40.2-extended builds, I expect they are  
>> very rough.  Try turning on -verbose and seeing what it's trying  
>> to load.
>
> I fixed it now, but I don't know if this is not a bug in pd 0.40:
>
> The problem is, that canvas-local search path really tread each  
> path as local to the canvas-path ( see line 1561 in g_canvas.c).
> So if you add e.g. /usr/local/lib/pd/extra/iemmatrix, it will  
> search for this path, but local to the canvas path - so if I  
> started Pd from /home/me it will search in /home/me//usr/local/lib/ 
> pd/extra/iemmatrix !

Ah yeah, I vaguely remember seeing something like that, nice find!

> Is this a feature or a bug of Pd ?

> I fixed it now in libdir.c, so that I add ../../usr/local/lib/pd/ 
> extra/iemmatrix to the canvas-local search path instead of /usr/ 
> local/lib/pd/extra/iemmatrix ...
> But I cannot guarantee that this will also work on windows ...

That sounds like a bug to me.  It could be a bug in my implementation  
of [import] rather than in Pd itself since I am using functions are  
not publically exposed (yet?).  Have you tried this with [declare]?   
Both [import]/[classpath] and [declare] use the same functions in Pd,  
they just have different interfaces.

../ should work fine on Windows, but ideally this would be handled  
better...

.hc

>
> LG
> Georg



------------------------------------------------------------------------

Mistrust authority - promote decentralization.  - the hacker ethic






More information about the Pd-list mailing list