lua-users home
lua-l archive

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


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 stated above (stable, unchanging SDK; not too many methods need to be referenced; necessity of passing (ints, bools, strings) to the called SDK methods, and returning these to Lua), can anyone make a recommendation as to what would
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 unpack
it?

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 StuffIt.

-Johann