[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: The current state of interfacing Lua with C++ code
- From: Miles Bader <miles@...>
- Date: Mon, 14 Dec 2009 10:33:27 +0900
Asko Kauppi <email@example.com> writes:
> I would warn you about SWIG - imho it's way too complex for the job at
> hand (when Lua is concerned). I've tried to like it twice, and failed
> both times. :/
I disagree. I think SWIG is, if anything, one of the _simplest_ to use
for basic interfacing (it's really easy to get a basic interface going),
and yet even this "simple" usage, will give you a pretty complete "Lua
view" of all your C++ classes. Once you want to do more, it's very
flexible and gives you a lot of power to tweak the interface etc.
Of course it depends on what you want to do -- if you only want to
export a simple list of functions with basic datatypes (int/float/...),
maybe one of the simpler binding libraries will do the job. But if you
want to take an existing C++ library, including classes, methods,
overloaded functions, etc, etc, SWIG makes the effort required pretty
[and of course it's pretty nice that you can then make interfaces for
_other_ languages (python, ruby, ...) with only a little extra work.
Not that I really _want_ to, mind you, but I'm sure there are people out
Come now, if we were really planning to harm you, would we be waiting here,
beside the path, in the very darkest part of the forest?