help with LUA (Windows)

Started by
5 comments, last by dmail 14 years, 2 months ago
I just downloaded the LUA binary: lua5_2_work2_Win32_dll9_lib.zip, and I'm having trouble getting LUA to work in my application. I'm using Visual Studio .NET 2005. When I do: "lua_State * test = lua_open(0);" it says that "lua_open identifier not found". I '#include' the lua.hpp file and I do: #pragma comment( lib, "LUA\lua52.lib" ), but it still doesn't work. Any help would be great. Thanks!
Advertisement
Quote:Original post by 16bit_port
I just downloaded the LUA binary: lua5_2_work2_Win32_dll9_lib.zip, and I'm having trouble getting LUA to work in my application.

I'm using Visual Studio .NET 2005. When I do: "lua_State * test = lua_open(0);" it says that "lua_open identifier not found". I '#include' the lua.hpp file and I do: #pragma comment( lib, "LUA\lua52.lib" ), but it still doesn't work. Any help would be great. Thanks!


Did you add the lua lib and include directories to your compiler?

To navigate to that menu:

Tools
-Options...
--Project and Solutions
---VC++ Directories
Here's what I did:

“Include files” I added “C:\Program Files\LUA\include”.
“Library files” I added “C:\Program Files\LUA”

and in my source code:

#include "lua.hpp"#pragma comment( lib, "lua52.lib" )


(Not working)
lua_open was a legacy define which IIRC is removed now that 5.2 is in the works. You should instead be using luaL_newstate or lua_newstate.
Thanks. I just went ahead and used the 5.1.4 binaries instead because 1) it's stable and 2) the tutorials I'm looking at are using lua_open.

Do you know of any tutorials for LUA that uses 5.2, dmail?
^ what he said.
Quote:Original post by 16bit_port
Thanks. I just went ahead and used the 5.1.4 binaries instead because 1) it's stable and 2) the tutorials I'm looking at are using lua_open.

Do you know of any tutorials for LUA that uses 5.2, dmail?


What is this LUA you speak of? Enter stage left phantom :)
Sorry no I do not know of any on line tutorials for 5.2 yet there is plenty of information on the mailing list. You may also want to check out the Lua forum which I believe is active once again.

This topic is closed to new replies.

Advertisement