Re: Is there a better way to do this?
"James Kanze" <james.kanze@gmail.com> wrote in message
news:ebfc1b1f-1ad3-421c-81c8-891d06bb1835@56g2000hsm.googlegroups.com...
On Jun 20, 4:55 pm, "Jim Langston" <tazmas...@rocketmail.com> wrote:
"Jim Langston" <tazmas...@rocketmail.com> wrote in message
news:vJq6k.3$Vq.2@newsfe05.lga...
I am trying to write an interface to a LUA compiler in C++.
I know there are some out there, I downloaded 5 or 6 and
couldn't get any to work correctly (they would compile in
DevC++, not MSVC++, wouldn't work with LUA library I had,
etc...) so I'm having to write my own.
Right now I'm working on trying to simply run a lua file
with parameters. Steps are not that difficult.
1. Load the lua file
2. Push the parameters using functions
3. Execute the code.
Well I'm trying to make this simple, and optimally I'd like
something like:
Lua L;
L.Execute( "MyFile.lua", "parm1", "parm2", "parm3" );
[SNIP]
Just one thing that I'm wondering about, however: where are the
arguments coming from. If it's from user input, it might be
just as easy to get them as an std::vector< std::string > to
begin with.
Well, the parameters will be coming from code itself, interfacing program
objects with Lua code. So there will be code such as:
L.ExecuteFile( MeetFile, Object1, Object2 );
L.ExecuteFile( InitializeFile, Object );
etc..
I'm building the framework right now to be used however it winds up being
used basically. Just trying to get the interface easy to use so using it
won't be a pita.