Using the last luaJIT lua_open returns null . This does not happen with the regular lua library.
lua_State *L = lua_open(); std::cout << L << std::endl;
Output: 0x0
How can I get luaJIT to work?
SSCCE:
#include <iostream> #include <luajit-2.0/lua.hpp> //linked library: libluajit-5.1.a int main(int argc, const char * argv[]) { lua_State *L = luaL_newstate(); // lua_open(); std::cout << L << std::endl; // 0x0 }
Additional information: built on OSX 10.9 from the source (tried both 2.0.2 and git) with make and make install . Using the compiler:
$ cc --version Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix
(Using the luajit command-line application luajit works fine, the script test runs without errors.)
source share