[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: bin2c (was: XMLRPC 0.0 for Lua)
- From: "Martin Spernau" <martin@...>
- Date: Wed, 28 Nov 2001 11:36:08 +0100
I had some confusion as I searched for this tool (bin2c) on the net and
found a bin2c.com file on SimTel that does something very similar, only
without adding the do_buffer calls to actually load the code into the
I now compiled the bin2c.c from the Lua-distro, and everything works very
I have here a Win32 exe with all relevant libs included for XML-RPC
(luaSocket1.4 and lxp) plus all needed .lua files compiled in.
Debug version is aroung 500KB and the Release version is 272KB !
So now please excuse me as I need to do some hoppiung around in circles :)
----- Original Message -----
From: "Luiz Henrique de Figueiredo" <email@example.com>
To: "Multiple recipients of list" <firstname.lastname@example.org>
Sent: Tuesday, November 27, 2001 5:40 PM
Subject: Re: XMLRPC 0.0 for Lua
> >Now if I find out how this bin2c binding of Lua code to an executable is
> See etc/README, reproduced below:
> This program converts files to byte arrays that are automatically
> run with lua_dobuffer. This allows C programs to include all
> Lua code, even in precompiled form. Even if the code is included
> source form, bin2c is useful because it avoids the hassle of
> quote special characters in C strings.
> Example of usage: Run bin2c file1 file2 ... > init.h. Then, in
> program, just do #include "init.h" anywhere in the *body* of a
> function. This will be equivalent to calling
> lua_dofile(L,"file1"); lua_dofile(L,"file2"); ...
> Note that the Lua state is called "L". If you use a different
> say "mystate", just #define L mystate before #include "init.h".