LUA and C++ Classes

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

LUA and C++ Classes

Nutritious Games - Tue Hald Madsen
Hello LUA list.

I´m quite new to LUA,and what I have seen so far is really cool.

I have tried to run some LUA code from a C program, and it was really really easy to implement LUA into my C program

BUT:
When I wanted to use LUA in a C++ class, things suddently went ugly.
Now, my problem is, that I want to call a non-static member function from LUA.
I have seen the LUA++ stuff written by Waldemar Celes, but it´s using LUA 3.
Does anyone know how to use LUA 4 in C++ classes ? In a straightforward way ?

Tue Madsen


Reply | Threaded
Open this post in threaded view
|

Re: LUA and C++ Classes

Denis Andreev
NGTHM> Does anyone know how to use LUA 4 in C++ classes ? In a
NGTHM> straightforward way ?

may be light wrapper luauserdata for you...

http://www.rm-f.net/~gambit/lua/luadata.tgz


--Denq


Reply | Threaded
Open this post in threaded view
|

Re: LUA and C++ Classes

Nutritious Games - Tue Hald Madsen
Thanks.

I´ll look into it.

Tue
----- Original Message ----- 
From: "Denis Andreev" <[hidden email]>
To: "Multiple recipients of list" <[hidden email]>
Sent: Tuesday, May 28, 2002 11:50 AM
Subject: Re: LUA and C++ Classes


> 
> NGTHM> Does anyone know how to use LUA 4 in C++ classes ? In a
> NGTHM> straightforward way ?
> 
> may be light wrapper luauserdata for you...
> 
> http://www.rm-f.net/~gambit/lua/luadata.tgz
> 
> 
> --Denq
> 


Reply | Threaded
Open this post in threaded view
|

RE: LUA and C++ Classes

Peter Prade
In reply to this post by Nutritious Games - Tue Hald Madsen
> Does anyone know how to use LUA 4 in C++ classes ? In a
> straightforward way ?
>
> Tue Madsen

try tolua http://www.tecgraf.puc-rio.br/~celes/tolua/ - that's what we are
using.

it has its quirks (some C++ constructs aren't recognized correctly) but
otherwise it works like a charm.

Peter


Reply | Threaded
Open this post in threaded view
|

Re: LUA and C++ Classes

Nutritious Games - Tue Hald Madsen
Thanks. This looks great.

Tue
----- Original Message ----- 
From: "Peter Prade" <[hidden email]>
To: "Multiple recipients of list" <[hidden email]>
Sent: Tuesday, May 28, 2002 1:47 PM
Subject: RE: LUA and C++ Classes


> > Does anyone know how to use LUA 4 in C++ classes ? In a
> > straightforward way ?
> >
> > Tue Madsen
> 
> try tolua http://www.tecgraf.puc-rio.br/~celes/tolua/ - that's what we are
> using.
> 
> it has its quirks (some C++ constructs aren't recognized correctly) but
> otherwise it works like a charm.
> 
> Peter
>