Re: luajit binary linking dynamically to libluajit.so on linux and osx

  • From: Cosmin Apreutesei <cosmin.apreutesei@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 14 Mar 2014 11:40:44 +0200

Hi, thanks for the explanation.

> Lua/C modules on POSIX systems must NOT be linked against a
> library that contains a Lua or LuaJIT VM. The executable either
> contains the VM or it loads the VM from a shared library. The
> modules are loaded later on and access the VM via global symbols.

Ok, that leaves me with a bunch of options that are a bit confusing to me:

1) `-flat_namespace -undefined suppress` vs `-undefined
dynamic_lookup` -- they both work, and I'm not sure if it matters
which I choose.

2) `-bundle` vs `-shared` -- they both work, but couldn't find a clear
answer on the difference between bundles and dylibs to make a choice.

Other related posts: