lua-users home
lua-l archive

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


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/
/usr/lib/python2.2/lib-dynload/ 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