سؤال

I am trying to install Luabind in my Windows 8 RP. This is what I have done so far.

  • My Visual Studio is 2012 RC version.
  • I have installed LuaforWindows 5.1.4
  • I have downloaded luabind-0.9.1
  • I have downloaded boost_1_51_0 that is needed by luabind
  • I have installed BOOST successfully
  • I have set the path for Bjam in my BOOST_ROOT Environment Variable
  • I have set the path for Lua in LUA_PATH Environment Variable

Now when I try to run bjam in Luabind directory the following error shows up.

error: at Jamroot:41 error: 
*** Unable to determine Lua include directory.

I don't understand why Jamroot is having difficulty finding the path to Lua directory. I also tried including path in my PATH Environment Variable instead of just in LUA_PATH Environment Variable.

I have been searching this for three days straight now. I also tried following this method But it still did not help.

If anyone has any idea what I am doing wrong then please let me know what I'm doing wrong.

هل كانت مفيدة؟

المحلول

Here's the jamroot code for luabind-0.9.1 around line 41:

LUA_PATH = [ os.environ LUA_PATH ] ;

if ! $(LUA_PATH)
{
    errors.user-error "*** LUA_PATH must be set." ;
}

local includes = [ GLOB $(LUA_PATH)/include $(LUA_PATH)/src : lua.h ] ;

if ! $(includes)
{
    errors.user-error "*** Unable to determine Lua include directory." ;
}

It looks like you have the LUA_PATH environment variable set because you didn't get an error stating otherwise, but bjam can't find lua.h in your %LUA_PATH%/include or %LUA_PATH%/src folder.

I've had similar problems with LUA_PATH before and ended up copying the value of LUA_DEV into LUA_PATH temporarily to get some tools to work. Check your variables and then consider doing this value copy until you get luabind built.


Edit: I'm using an older version of Boost, but I would expect the build to work the same. Below are my environment variables as they were configured by the Lua installer. Note that LUA_PATH doesn't point to the Lua\5.1 directory like I would have expected it to, hence my need to change it temporarily.

LUA_PATH=;;C:\Program Files\Lua\5.1\lua\?.luac

LUA_DEV=C:\Program Files\Lua\5.1

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top