Want to install Lua!
I've been wanting to get into game dev, and, since there's a large amount of references to Lua, I want to install it on my computer. Unfortunately, I don't have linux orunix, so I can't do the clean "make" command. Can anyone provide me with a step-by-step guide for installing the latest version of Lua onto Windows XP and linking it into a file correctly? I feel like a retard for asking this, but I get lost quickly without clear and consise directions.
Thanks to all who answer
Well, that is a pretty broad question. As far as saving lua files goes, they are just text files that you can write in notepad.
As far as using it in a C++ program, that is out of the scope of this one post. I would take a look at http://www.lua.org/pil/index.html, specifically Part IV which talks about the C API.
You can write and run lua scripts, and even just execute a line at a time using the Lua5.1.exe program that comes in the lua5_1_2_Win*_bin.zip. Just run it and start typing away. If you don't have any programming background, then using the lua C API to interface with scripts may not be the best way to start.
As far as using it in a C++ program, that is out of the scope of this one post. I would take a look at http://www.lua.org/pil/index.html, specifically Part IV which talks about the C API.
You can write and run lua scripts, and even just execute a line at a time using the Lua5.1.exe program that comes in the lua5_1_2_Win*_bin.zip. Just run it and start typing away. If you don't have any programming background, then using the lua C API to interface with scripts may not be the best way to start.
I sugest you go get tolua++. It will allow you to take an "interface" file for your c++ program, and
will generate appropriate linking code, so that you can see your C++ code from lua, and changes to
shared variables in lua will automagically change the stuff in the C++ code.
(Though you still need to look up the C api for lua so that you can execute a loaded script, I sugest
you just look at the provided source code for the lua5.1 shell program)
will generate appropriate linking code, so that you can see your C++ code from lua, and changes to
shared variables in lua will automagically change the stuff in the C++ code.
(Though you still need to look up the C api for lua so that you can execute a loaded script, I sugest
you just look at the provided source code for the lua5.1 shell program)
If you are using either Code::Blocks or Dev-CPP, then you can download and install the Lua v5.0.2 DevPack.
The Lua site has a newer version up, but I haven't got that to work yet (not backward compatible).
The Lua site has a newer version up, but I haven't got that to work yet (not backward compatible).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement