Sign in to follow this  
Sevay86

Want to install Lua!

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this