|
Hi all, Having a headache trying to build an Xcode project for a lua module. I checked the wiki article, and raided the list archives, and found various contradictory answers. Would like to know if there is a standard (which can also work as an Xcode project). I checked existing lua modules, and I can find both .so and .dylib for OSX. Likewise, I can find dyld and dlopen both recommended for OSX (with dyld being the default, but dlopen being recommended by Apple). I followed the standard on the wiki [1], using -DGLUA_LUA51 -DLUA_USE_MACOSX for the main application embedding Lua, and using -bundle -undefined dynamic_lookup for the module library (being sure to not link against the Lua core). But a bundle project in Xcode creates a whole folder of stuff, rather than a single binary. No matter what I name the bundle (.so, .dylib, .bundle) I get "file is not a bundle" error. An OSX bundle is a folder - is Lua not respecting this? If Lua expects a binary, shouldn't it be a dynamic library rather than a bundle? Sorry if I sound confused - I'm inexperienced at dynamic loading. But I suspect other Lua users on OSX may be too, but wanting to write extension library modules for Lua like me. Is there actually a standard for building modules on OSX? Does anyone have an Xcode project that conforms to it (or at least works without hacks) that they would be willing to share? Thanks, Graham |