|
Chris Marrin wrote:
Worth looking into for sure. I'm not super keen on using class inheritance (could get messy when MyClass inherits from other stuff and they too use Function::Object, perhaps you could comment on that), but lots of good ideas there, and maybe some code to re-use?Oliver Schoenborn wrote:Hello, I'm somewhat unhappy with the existing bindings to C++. The major ones* lua++: clean and simple, but requires custom lua * cpplua: some good ideas, but some less good, and doesn't seem to be maintained * luabind: most powerful, but requires boost, and syntax a little unnatural (IMO) * swig and tolua++: don't allow for variable argument lists (AFAICT) or for logging callbacks and gets/setsI have had to use basic lua binding to C for on-the-job projects, and I'm thinking that because of the above, perhaps yet another C++ alternative that has the following characteristics might fill a need:You might want to see what I did in fusion, which is a piece of Emma (http://emma3d.org). It is much simpler than the other solutions out there. For instance, to make a C++ object that is accessible to Lua you go:class MyClass : public Fusion::Object { ... DECLARE_CLASS(MyClass, Object); } [...snip for brevity...]It is a nice little package which links to a dll of around 176K on win32. It has no dependencies other than Lua and is designed for Lua 5.1.When I get the chance I will release this as a package and do better docs. But please use or leverage it as you see fit...
Oliver