lua-users home
lua-l archive

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


Hi! Is there any way to have Lua 5.1 (actually LuaJIT) and Lua 5.2 (LuaJIT doesn't support _ENV) on the same program?

should be possible, as long as you wrap each interpreter into a module that hides its internal symbol references from the global name space.
Otherwise the linker will get confused when it tries to build your main program.
Uhh... what? (kinda C noob)

When a module is linked, all symbol references that are resolved within the files of the module, can be hidden, leaving only the unresolved ones visible (external references)
How this actually is commanded, depends on compiler / linker. ld does this with a version script.

--
Oliver