C++ and Lua question.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

C++ and Lua question.

Nahuel Greco
Hi

What is the best way / library to use Lua with C++?

I want (in the perfect case) to do the following:

	Call Lua functions from C++ code.

	Call C++ functions and functions members from Lua.

	Use C++ Classes from Lua, almost transparently.

	Instance a C++ class in Lua.

	Use a C++ instance from Lua (access the data / call methods).

	Pass a C++ instance to a C++ function/f. member function from Lua.

	Derive C++ classes in Lua (and i can define new virtual functions in lua).

	Derive Lua "classes" in C++ ??

	Access Lua data from C++.

	Access Lua data from C++ with STL.

	Access LOCAL variables of a C++ function from a lua code called in that function.

There is some library that i can use to do this?, which "features"
that i have listed are present and which not?


BTW: Can i define some "collections of variables" in lua, and then.. return to C
code, and call another lua function that can access that collection of variables 
(variables and other lua functions).

(im very very very new to Lua).



_------------------------------------------------------------.
| Nahuel Greco                 Web Development - Open Source |
| http://www.codelarvs.com.ar  Game Programming - Research   |
| Freelance coding / sysadmin  Networking. The answer is 42. |
'------------------------------------------------------------'


Reply | Threaded
Open this post in threaded view
|

Re: C++ and Lua question.

Luiz Henrique de Figueiredo
>What is the best way / library to use Lua with C++?

Our addons page lists several C++ tools:
	http://www.tecgraf.puc-rio.br/lua/addons.html
I don't know whether they do what you want, but check them out.
The authors hang around the list and can probably help you.
--lhf

Reply | Threaded
Open this post in threaded view
|

Re: C++ and Lua question.

Nahuel Greco
In reply to this post by Nahuel Greco
On Tue, 13 Mar 2001 13:45:56 -0300
Waldemar Celes <[hidden email]> wrote:

> > What is the best way / library to use Lua with C++?
> >
> 
> I don't know the best way.
> I developed the tolua tool: www.tecgraf.puc-rio.br/~celes/tolua
> and, of course, I use it to bind C++ to Lua.
> tolua helps you to access C++ feature from Lua,
> and the Lua own API allows you to access Lua features from C++.
> 

What are the diferences of Tolua with the other bindings listed in the lua
addons page: Luna, Not-tolua, Script ?. And the cuestionable question...
what is better? :)


_------------------------------------------------------------.
| Nahuel Greco                 Web Development - Open Source |
| http://www.codelarvs.com.ar  Game Programming - Research   |
| Freelance coding / sysadmin  Networking. The answer is 42. |
'------------------------------------------------------------'