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... ;-)


----- Original Message ----- From: "Mike Pall" <>
To: "Lua list" <>
Sent: Monday, December 20, 2004 5:05 PM
Subject: Re: loadlib for Mac OS X


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

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