Quote:
Originally Posted by ericshliao
It seems that tolua++ is a fork of tolua.
What is the use case of of tolua (or tolua++)? I don't understand. Suppose I have some lib written in C, then can I use tolua to generate lua binding for the lib?
|
Yes and no

. Basically you have to
- write a file that decribes the functions you wand to be available in Lua (this looks very much like a C include file)
- use tolua++ to generate C file (this handles the interface betwwen C and Lua)
- compile and link this C file (+ your own code if you want) to a Lua module (a .so file).
This is easy for simple C libraries, and quite some work for C++ libs with lots of classes and types. If you google around, you will find some examples.
If I have some spare time (and no projects that are more fun

) I wil use tolua++ to do a Lua binding for some Iliad libraries...
Quote:
Originally Posted by ericshliao
I want to use libxml2 with lua, and currently I only found lua binding for the part of xmlreader of libxml2 ( http://asbradbury.org/projects/lua-xmlreader/). I need xmltree part. Can I use tolua to generate lua binding automatically?
|
Any interesting project in the pipeline? Depending on your needs, you might:
Have fun!