[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Calling C++ SDK methods from Lua
- From: Johann Hibschman <jhibschman@...>
- Date: Tue, 23 Mar 2004 19:09:24 -0500
On Mar 23, 2004, at 1:07 PM, Mark Horowitz wrote:
Here is my question: There seem to be several similiar but competing
techniques. Some generate code, some not. Given my preconditions as
above (stable, unchanging SDK; not too many methods need to be
necessity of passing (ints, bools, strings) to the called SDK methods,
returning these to Lua), can anyone make a recommendation as to what
be the best approach to use?
Personally, if you only have 20 functions, I'd recommend just writing
the wrappers by hand. That way, you don't depend on any outside code.
The lua documentation is pretty good, and you can look at the lua
standard library for examples.
Look at lmathlib.c for some very straightforward examples, liolib.c for
something a little bit more complicated. It's fairly easy to modify
the luamain program to use new libraries.
***** Also: I looked at the toLua++, and downloaded the file
(tolua++-current.tar.bz2). Is this file usable on Windows? How do I
That's a bzip2 file. I don't know enough about windows compression
utilities to know which will work; I generally have good luck with