2013-12-16 75 views
2

我正在尝试将boost库作为我想尝试使用的开源项目的一部分来构建。在当前目录中看不到jamfile

C:\boost_1_55_0>bootstrap.bat gcc 
Building Boost.Build engine 

Bootstrapping is done. To build, run: 

    .\b2 

[snip] 

C:\boost_1_55_0>b2.exe --toolset=gcc 
Unable to load Boost.Build: could not find "boost-build.jam" 
--------------------------------------------------------------- 
BOOST_ROOT must be set, either in the environment, or 
on the command-line with -sBOOST_ROOT=..., to the root 
of the boost installation. 

Attempted search from C:\boost_1_55_0 up to the root 
at C:/share/boost-build 
and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: c:/boost_1_55_0. 
Please consult the documentation at 'http://www.boost.org'. 

C:\boost_1_55_0>dir *.jam 
[snip] 

Directory of C:\boost_1_55_0 

09/21/2013 01:17 PM    866 boost-build.jam 
09/21/2013 01:17 PM   18,083 boostcpp.jam 
12/16/2013 03:36 PM    76 project-config.jam 
       3 File(s)   19,025 bytes 
       0 Dir(s) 34,868,432,896 bytes free 

工具集的MinGW/GCC,这是正确的我的%PATH%。

所以基本上,不知何故,升压没有看到boost-build.jam文件,在当前目录是

请注意,我已经设定了正确BOOST_ROOT

C:\boost_1_55_0>echo %BOOST_ROOT% 
c:/boost_1_55_0 

我在束手无策我还挺这里。我尝试了不同的前后斜线排列。此外,来自b2的错误消息包括路径C:/share/boost-build,我有没有想法它来自哪里。我已经完整地搜索了整个代码库,并且看不到可能在任何地方指定它的配置文件。


所以我可能需要Boost.Build?

不管怎么说,从here按照说明建立Boost.Build产生完全相同的问题:

C:\boost_1_55_0\tools\build\v2>echo %BOOST_ROOT% 
C:/boost_1_55_0 

C:\boost_1_55_0\tools\build\v2>bootstrap.bat gcc 
Bootstrapping the build engine 

Bootstrapping is done. To build, run: 

    .\b2 --prefix=DIR install 


C:\boost_1_55_0\tools\build\v2>b2 --toolset=gcc --prefix=c:/pathutils install 
Unable to load Boost.Build: could not find "boost-build.jam" 
--------------------------------------------------------------- 
BOOST_ROOT must be set, either in the environment, or 
on the command-line with -sBOOST_ROOT=..., to the root 
of the boost installation. 

Attempted search from C:\boost_1_55_0\tools\build\v2 up to the root 
at C:/boost_1_55_0/tools/build/share/boost-build 
and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: C:\boost_1_55_0\tools\build\v2\test\startup\boost-root\build, C:/boost_1_55_0. 
Please consult the documentation at 'http://www.boost.org'. 

回答

0

好,我只能假设在我的电脑的%PATH%中有某种东西以某种方式

我在一个干净的虚拟机中做了相同的设置过程,它似乎编译好。

我不知道具体是什么错误。

1

这不是找你的Jamfile。它正在寻找boost.build工具子目录,其中包含支持的阻止脚本。在Linux上,这将是一个“在/ usr /共享/升压构建/”默认情况下,在Windows上,你可能需要设置BOOST_BUILD_PATH在指向哪里boost.build支持脚本安装:

http://www.boost.org/doc/libs/1_55_0/doc/html/bbv2/reference.html

+0

没有。我设置了'BOOST_BUILD_PATH',它没有帮助。另外,包含相关jam脚本的boost-build.jam文件位于根文件夹(我的shell的'pwd')中。最后,从我可以告诉阅读boost文档,'BOOST_BUILD_PATH' *主要*可选。 –

+0

最令人困惑的是,从我所知道的情况来看,我正在使用的相同程序对于其他人没有问题。 –

+0

基本上,AFICT,你解压缩boost库,运行'bootstrap.bat',*有时*设置'BOOST_ROOT',并且所有内容都是**应该工作。 –