lua-users home
lua-l archive

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


Perhaps Im wrong, but I will tell you my experiences. I also tried SWIG for binding, but found a little problem. SWIG only passes your class definition to Lua, not actual class instances. Doing so requires some weird workarounds, so I would recommend using tolua or luabind, whatever works better for you.

Joey Mukherjee escribió:
I create an instance of my class variable in C++ and want to use Lua to use some of the routines in my C++ class so I used SWIG to generate the bindings for Lua and I think I have that right.

However, I can not figure out how to make Lua use my C++ variable instance instead of creating a new one. I was looking at the Wiki and I am very close to the CppObjectBinding method, except I am using SWIG.


--
http://dsgp.blogspot.com | Linux, programación, juegos
Have no place I can be since I found Serenity
But you can’t take the sky from me

		
______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com