lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


With the release of luabind-0.7 there were slight, breaking interface changes.
I don't think these changes were clearly documented, but the existing documentation is good.

luabind::get_globals is the old form.
The new form is luabind::globals(lua_State*);  there is also luabind::registry(lua_State*).
This is stated in the documentation (Related Functions section).

FYI, there is a luabind-specific mailing list:
http://lists.sourceforge.net/lists/listinfo/luabind-user
(also gmane.comp.lang.lua.bind.user)
There is also #luabind on freenode.

Good luck!


Yuanming Chen wrote:
> I wrote a really simple console application with MSVC 7.1 to test out
> luabind, but has lots of trouble to get luabind compiled. I am using
> boost_1_33_0, lua-5.0.2 and luabind-0.7. The following is the code:
> 
> extern
> 
> "C" {
> 
> #include "lua.h"
> 
> #include "lualib.h"
> 
> #include "lauxlib.h"
> 
> }
> 
> #include
> 
> "luabind/luabind.hpp"
> 
> int main() {
> 
> lua_State *pMyLuaState = lua_open();
> 
> //Init the io, math libraries.
> 
> luabind::open(m_pMyLuaState);
> 
> int nError = lua_dofile(pMyLuaState, "yes.lua");
> 
> luabind::object luaGobal = luabind::get_globals(pMyLuaState);
> 
> lua_close(pMyLuaState);
> 
> return 0;
> 
> }
> 
> But I always get the following compile error:
> 
> C:\LuaBindDemo.cpp(42): error C2039: 'get_globals' : is not a member of
> 'luabind'
> 
> When I change the boost include path from 1_33_0 to 1_32_0, the same
> error shows up.
> 
> I also tried different combinations of boost, lua and luabind but
> nothing works so far. Do you know what's the correct way to compile
> luabind with VC++7.1? Thanks for your help!
> 
> Yuanming
>