lua-users home
lua-l archive

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


Actually, both CFBundle and _dyld_* are good solutions -- I think as long as there's no NS prefix, it's good (and easy to use) for everybody... ;-)

Thanks,
Dario

----- Original Message ----- From: "Mike Pall" <mikelu-0412@mike.de>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Monday, December 20, 2004 5:05 PM
Subject: Re: loadlib for Mac OS X


Hi,

Roberto Ierusalimschy wrote:
After all, is there a consensus about the "correct"
way for Lua to load dynamic libraries in Mac OS X?
NSAddImage? NSCreateObjectFileImageFromFile?

I think the consensus on the list was to use bundles. If you are not
convinced yet, then have a look at this:

osx$ file /System/Library/Perl/darwin/auto/Socket/Socket.bundle
/System/Library/Perl/darwin/auto/Socket/Socket.bundle: Mach-O filetype=8 powerPC

osx$ file /usr/lib/python*/lib-dynload/_socket.so
/usr/lib/python2.2/lib-dynload/_socket.so: Mach-O filetype=8 powerPC

(FYI: filetype=8 are bundles)

Dario Accornero wrote:
Ahem, no, please do *not* force us to link against the AppKit.  Many
applications are Cocoa-free and want to stay that way.
[...]
In particular, the low-level APIs seem well suited for something like
loadlib.

Ok, this is a reasonable request. I'll try to rewrite the loadlib patch
to use the _dyld_* functions instead.

But there needs to be a definitive decision regarding bundles vs. dylibs
first.

Bye,
    Mike