5

I trying to make some HelloWorld with Lua + Luabind in Visual Studio 2010. I downloaded Lua src from here and added it's source files into project. Then I download and added source of luabind. Finaly added main.cpp. So after that tried to compile project and got errors in mostly all luabind files:

error C3861: 'lua_strlen': identifier not found
error C2065: 'LUA_GLOBALSINDEX' : undeclared identifier

Please help me what I did wrong? What files I must add to project? Maybe some additional library? What best practice to organize lua projects?

Edward83
  • 6,664
  • 14
  • 74
  • 102

1 Answers1

7

It seems that luabind is written for Lua 5.1 and you've downloaded Lua 5.2.

lhf
  • 70,581
  • 9
  • 108
  • 149
  • Yes you right! With Lua 5.1 it works. As I understood there no backward compatibility since Lua 5.2? – Edward83 Oct 24 '12 at 13:18
  • 3
    @Edward83, you can compile Lua 5.2 with backward compatibility with Lua 5.1 by defining `LUA_COMPAT_ALL`. – lhf Oct 24 '12 at 13:36
  • 1
    @Edward83: Note that there are various variations of Luabind on Github repos that provide 5.2 compatibility. But since those are all scattered and there are no official distros, you may want to consider Luabind as being effectively (and sadly) abandoned. – Nicol Bolas Oct 24 '12 at 14:21