lua-users home
lua-l archive

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

Hello There,

I'm afraid this goes beyond my knowledge of toLua, (I use SWIG instead). But I think you might need to link the toLua library and possible the Allegro library too.

Any toLua experts out there can advise?

Leo M. Cabrera <> wrote :

> >
> > However: and even better idea is to seriously
> consider either using an existing wrapper, or using a tool to generate the
> wrappers for you.
> > You mentioned in one of the other posts that you
> have some other game engine components which need to be wrappered.  That doesn't
> stop you from using the ready written code & extending it.
> After you said that, I finally understood the purpose of toLua even 
> though it wasn't even mentioned... *Feels like a noob*
> So I decided to use it and recycle this thread. :-)
> I fixed the problems with the bitmap with a similar (but way less 
> practical) solution to yours.
> Now, yes, I do need many things to be shared with Lua. So how do you 
> exactly use the toLua tool? I generated a *.pkg file out of a stripped 
> down header file (by stripped down I mean no includes, no structs, and 
> no include guards), and it gave no errors converting, but then it gives 
> compiler errors:
> -------------------------------------------------------------
> E:\Projects\C\Lua Test\src>mingw32-make
> gcc -ansi -g -Wall   -c -o sprite_Lua.o sprite_Lua.c
> sprite_Lua.c: In function `toluaI_sprite_loadSprite00':
> sprite_Lua.c:24: warning: implicit declaration of function `tolua_istype'
> sprite_Lua.c:25: error: too few arguments to function `tolua_isnoobj'
> sprite_Lua.c:30: warning: implicit declaration of function `tolua_getstring'
> sprite_Lua.c:32: error: `Sprite' undeclared (first use in this function)
> sprite_Lua.c:32: error: (Each undeclared identifier is reported only once
> sprite_Lua.c:32: error: for each function it appears in.)
> sprite_Lua.c:32: error: `toluaI_ret' undeclared (first use in this function)
> sprite_Lua.c:32: error: syntax error before ')' token
> -------------------------------------------------------------
> ... and it goes on and on... XD
> Is it that I'm using the wrong version or something of the sort? I think 
> that because of the too few arguments errors...
> Help this noob? Thanks in advance!