lua-users home
lua-l archive

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

Great that works perfectly thanks.

So fast...

On Oct 31, 2009, at 9:13 PM, Mike Pall wrote:

Graham Wakefield wrote:
At the risk of looking stupid ~ currently the makefile installs headers into /usr/local/include, but no static library libluajit.a (or whatever
it should be called); is embedding LJ2 problematic?

Errm, yes, I knew I forgot to mention something in the TODO list.
Thank you for reminding me.

The plan is to switch to generating a shared library on all
platforms (currently only done on Windows). But I haven't gotten
around to this, yet. That's why it currently builds everything
into the executable.

Or do you really want to embed a static library?
In this case, simply do this:

 cd src
 ar rcu libluajit-2.0.0-beta1.a lj_*.o lib_*.o

Embedding it is actually trivial. Just link against it, like you'd
link with liblua.a. No extra setup required. If you've replaced
luaL_openlibs(), remember to add the "jit" and "bit" libraries, too.