Lua.lib is all of Lua, compiled together into one distributable file. For some reason, Lua isn't supplied compiled - you get all the source and have to compile it yourself. Attached is the zip I use containing all you need, compiled.
Extract this zip to a folder somewhere (I have C:/C++/Lua).
In VC++, click Tools -> Options then click the directories tab. Click the "new" button top right (looks like a dotted box with a star top left and then a new row should appear, click the "..." button to browse to the directory where you extracted the zip file.
Click OK. You can now include the lua library and include file from any project.
What I do in my Lua projects:
- Project, Settings, Link - where it says "object/library modules" I add "lua.lib lualib.lib" to the end of that text box.
- Use the following code in my program to load Lua
// Include Lua header files
extern "C"
{
#include <lua.h>;
#include <lualib.h>;
#include <lauxlib.h>;
}
Remember becuase you added the dir with the include files / lib files to your Directories tab you don't need to copy any of the files you're including to your current working folder.
I then just do
// A new Lua state
lua_State * pLua = lua_open();
to get a Lua state and you're off.
Once you've got it set up this tutorial is good for learning how to use the engine.
http://www.gamedev.net/reference/programming/features/lua/page2.asp