lua-users home
lua-l archive

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

Ah, its working now without using the embedded tolualua.c code.  I don't
know why though, I just added lua2c.lua to the list (it wasnt there).


-----Original Message-----
[]On Behalf Of Ariel Manzur
Sent: 12 June 2003 14:56
To: Lua list
Subject: Re: modifying tolua

At 12:22 12/06/2003 +0800, you wrote:

>It seemed to work well and all, but unfortunately the output file it
>generated was zero(0) bytes... it didnt contain anything.  I checked the
>program and lua_dofile () returns success, so there isnt a problem with the
>*.lua files (maybe).  All the required lua libraries were called (baselib,
>iolib, strlib), so it couldnt be that.  Whats the big difference between
>internal version and the *.lua files, besides being internal?
>I'm at a quandary now.  Anyone can lend me a little insight? :)

I had the same problem with the included script files (they are all enbeded
on tolualua.c actually). Here's what I added to the Makefile to get it to
recompile when I change a .lua file:

SCRIPTS = array.lua \
basic.lua \
class.lua \
clean.lua  \
code.lua  \
container.lua \
declaration.lua \
define.lua \
doit.lua \
enumerate.lua \
feature.lua \
function.lua \
lua2c.lua \
module.lua \
operator.lua \
package.lua \
typedef.lua \
variable.lua \

tolualua.c: $(SCRIPTS)
         tolua -H tolualua.h -o tolualua.c tolualua.pkg

right before the 'OBJS' line. That'll rebuild 'tolualua.c' everytime you
change on of the script files, and compile everything in the binary. As you
can see, it uses tolua, so you need to keep a copy of a working binary. I
don't know about the modifications you made, but that should make it easier
to test it.

hope it helps.. bye..