lua-users home
lua-l archive

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



On Apr 1, 2009, at 10:08 PM, Sam Roberts wrote:

On Wed, Apr 1, 2009 at 6:23 PM, Adam Starkey <adam@adbe.org> wrote:

On Apr 1, 2009, at 7:09 PM, Luiz Henrique de Figueiredo wrote:

env MACOSX_DEPLOYMENT_TARGET=10.3 gcc -o random.so -bundle - undefined
dynamic_lookup lrandom.

Thanks, but that isn't working for me.

Try running nm on your app to see if the symbols are there.

Which finally helped the penny to drop.

My app is c++ and the compiled-in Lua code is being name mangled. For reasons that probably made sense to me at the time[1], I was extern "C"ing the Lua headers in my .so. So of course they couldn't link back to my app.

A total numpty mistake, but I'm happy to admit to it, in case this serves as helpful to anyone else in future.

Thanks to both of you for your help.

[1] It's been a long couple of days.

--
Adam Starkey