lua-users home
lua-l archive

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


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