On 3 Mar 2011, at 00:14, Andreas Rottmann wrote:

>>>> scheme@(guile-user)> (define libm (dynamic-link "/usr/lib/libm.dylib"))
>>>> ERROR: In procedure dynamic-link: file: "/usr/lib/libm.dylib",
>>>> message: "file not found"
>>> 
>>> You should omit the extension, which will be automatically inferred by
>>> Guile (actually ltdl) depending on the system:
>>> 
>>> (dynamic-link "/usr/lib/libm")
>>> 
>>> or:
>>> 
>>> (dynamic-link "libm")
>> 
>> None of those work - I checked and rechecked that. Making a soft link
>> ending on ".so", and it works fine. I have seen this before in the
>> Bessel function example.
>> 
> This looks like a bug, probably in libtldl. I'd guess that on OS X, it
> is *supposed to* try the .dylib extension instead of .so.  

Yes, and try without adding a file name extension.

> Tracing the
> process to see what it actually looks for might be interesting.

I made a softlink ending in .so, and then it worked.

> Another related issue that has come up in IRC is versioning: If I
> understand correctly, it is currently impossible to specify the version
> of the shared object to be used (as one cannot even pass a full filename
> to `dynamic-link').

The full path works, as long as the name of library actually opened ends in .so.



Reply via email to