lua-users home
lua-l archive

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


I'm making available a C++ lib to facilitate embedding Lua in a C++ app. It is called Lua-icxx (pron. lua'ix), it is hosted on SourceForge (http://www.sf.net/projects/lua-icxx). Example code using it:

// Create Lua interpreter:
LuaInterpreter lua; 
// capture Lua's print function:
LuaFuncRef luaPrint = lua.eval("print"); 
// print using luaPrint:
luaPrint("Hello World");

So far, lua-icxx has only been used by me and a couple other people, so it may be of limited use to the community at large, but never know. Feedback or, even better, contributions, are most welcome. The lua-icxx mailing list is lua-icxx-users@lists.sourceforge.net and home page with docs is at http://lua-icxx.sf.net

Note that lua-icxx is not a C++ binding ie it is not for extending Lua with C++, expose C++ classes etc. It merely provides a OO API to call Lua functions, get tables items, evaluate Lua expressions etc, from C++ app, without having to manage the Lua stack. It integrates well with SWIG generated bindings, etc. 

Tested only for Lua 5.1 on Windows (help welcome for more platforms/versions!). 

I hope others find it useful (don't hesitate to use the lua-icxx mailing list!).
Oliver