bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac OS X .dylib not working


From: Hans Aberg
Subject: Re: Mac OS X .dylib not working
Date: Fri, 4 Mar 2011 10:44:54 +0100

On 4 Mar 2011, at 03:59, Peter O'Gorman wrote:

>>> Mac OS X does not care about file name extensions; .dylib is just a 
>>> convention for native dynamic libraries.
> 
> The static linker when it sees a -l flag will look for files beginning with 
> "lib" and ending in ".dylib", ".so" (though this is recent and perhaps not 
> documented) and ".a". So, I think you could say that it cares about file name 
> extensions.

One is free to implement programs that do such things.

>>> So the wanted behavior is to first try opening a library without adding an 
>>> extension, and then try out different endings. On Mac OS X, it would be 
>>> best trying out .dylib first - I haven't seen any other ending in use.
> 
> It does seem as though guile should sometimes be trying lt_dlopen() first - 
> then libltdl will attempt to open whatever it's given.

That might be an hack.

>>  -- the libtool archive extension .la
>>  -- the extension used for native dynamically loadable modules on the
>> host platform, e.g., .so, .sl, etc.
> 
> On Mac OS X, libtool's idea of the native dynamically loadable module 
> extension is ".so", and it's not going to change.
> 
> However, I can see the point that libltdl should try .dylib as well as .so 
> for lt_dlopenext on Mac OS X. I will come up with a patch for that.

The important thing is to try .dylib - all libraries I have sen use it. It can 
of course try .so as well.

Hans





reply via email to

[Prev in Thread] Current Thread [Next in Thread]