我正在尝试使用mingw在Windows 7 x64机器上构建boost库.当我尝试运行b2时
b2 --build-dir="C:\boost\build" --toolset=gcc --with-python
Run Code Online (Sandbox Code Playgroud)
构建库我得到一个错误
Jamroot:138: in modules.load
rule boostcpp.set-version unknown in module Jamfile</C:/Users/root/Downloads/boost_1_47_0>.
C:/Users/root/Downloads/boost_1_47_0/tools/build/v2/build\project.jam:314: in load-jamfile
C:/Users/root/Downloads/boost_1_47_0/tools/build/v2/build\project.jam:62: in load
C:/Users/root/Downloads/boost_1_47_0/tools/build/v2/build\project.jam:168: in project.find
C:/Users/root/Downloads/boost_1_47_0/tools/build/v2\build-system.jam:570: in load
C:\Users\root\Downloads\boost_1_47_0\tools\build\v2/kernel\modules.jam:283: in import
C:\Users\root\Downloads\boost_1_47_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build
C:\Users\root\Downloads\boost_1_47_0\boost-build.jam:17: in module scope
Run Code Online (Sandbox Code Playgroud)
我做错了什么以及如何解决?任何帮助表示赞赏
谢谢
编辑:
我想在qt sdk中使用boost库,它使用mingw.这就是为什么我不能使用boost安装程序.当然,除非我找不到解决这个问题的方法,否则我将不得不求助于使用mstc构建的qt.
这是我编写的一个教程,用于在Windows 7上使用MinGW编译Boost 1.45.0.我在这里复制教程,以防链接中断:
1)首先我们需要编译Boost.我们将使用Boost的最新版本:1.45.0(可能不是您阅读本教程时的最新版本.
1.1)下载Boost来源:
1.2)要编译Boost,我们需要使用BJam.BJam的消息来源包括在boost的来源中.然而,我们不能使用BJam的二进制文件:由于以下问题,我们必须编译它:http://comments.gmane.org/gmane.comp.lib.boost.user/64146 .
要编译BJam,请转到Boost的源代码,找到build.bat(应位于\ boost_1_45_0\tools\build\v2\engine\src),运行cmd,cd到build.bat的文件夹并执行:build.bat gcc(source)
编译持续不到30秒.
1.3)编译BJam后,我们现在可以编译Boost.在$ PATH中添加bjam.exe,运行cmd,cd\boost_1_45_0然后执行:
bjam --toolset=gcc "--prefix=C:\DestinationFolder" install
Run Code Online (Sandbox Code Playgroud)
DestinationFolder你想要的任何文件夹路径在哪里(来源).
编译大约持续30分钟.
| 归档时间: |
|
| 查看次数: |
10518 次 |
| 最近记录: |