5
我試圖在Visual Studio 2010中使用Lua + Luabind創建一些HelloWorld。我從here下載了Lua src並將它的源文件添加到項目中。然後我下載並添加了luabind的源碼。 Finaly添加了main.cpp。所以之後,試圖編譯項目,並在大多數luabind文件中得到錯誤:Lua項目編譯有錯誤(luabind)
error C3861: 'lua_strlen': identifier not found
error C2065: 'LUA_GLOBALSINDEX' : undeclared identifier
請幫我,我做錯了什麼?我必須將哪些文件添加到項目中?也許一些額外的庫?組織lua項目的最佳做法是什麼?
是的你對!隨着Lua 5.1的工作。據我瞭解,自從Lua 5.2以來沒有向後兼容性? – Edward83
http://lua-users.org/wiki/LuaVersionCompatibility – Edward83
@ Edward83,您可以通過定義'LUA_COMPAT_ALL'來編譯Lua 5.2,使其與Lua 5.1向後兼容。 – lhf