c++ - 使用 MinGW 构建 boost 给出 "argument error"

标签 c++ boost mingw

我正在尝试使用 MinGW 构建 boost 并下载了 boost 1.45bjam 版本 3.1.18。 OS=NT

进入 boost 的根目录后,我尝试使用 bjam toolset=gcc --build-type=complete stage 编译它,但它不起作用。这是返回的错误消息的开头:

C:\boost\boost_1_45_0>bjam toolset=gcc --build-type=complete  stage
C:/boost/boost_1_45_0/tools/build/v2/build\configure.jam:145: in builds-raw
*** argument error
* rule UPDATE_NOW ( targets * : log ? : ignore-minus-n ? )
* called with: ( <pbin.v2\libs\regex\build\gcc-mingw-4.5.2\debug>has_icu.exe :  : ignore-minus-n : ignore-minus-q )
* extra argument ignore-minus-q
(builtin):see definition of rule 'UPDATE_NOW' being called
C:/boost/boost_1_45_0/tools/build/v2/build\configure.jam:179: in configure.builds
C:/boost/boost_1_45_0/tools/build/v2/build\configure.jam:216: in object(check-target-builds-worker)@410.check

---------- deleted 27 lines ---------

Jamroot:648: in build-multiple
Jamroot:634: in object(top-level-target)@96.generate
C:/boost/boost_1_45_0/tools/build/v2/build\targets.jam:732: in generate-really
C:/boost/boost_1_45_0/tools/build/v2/build\targets.jam:704: in object(main-target)@628.generate
C:/boost/boost_1_45_0/tools/build/v2\build-system.jam:735: in load
C:\boost\boost_1_45_0\tools\build\v2/kernel\modules.jam:283: in import
C:\boost\boost_1_45_0\tools\build\v2\kernel\bootstrap.jam:142: in boost-build
C:\boost\boost_1_45_0\boost-build.jam:17: in module scope

对于我为什么会收到这些错误的任何提示,我将不胜感激。

最佳答案

以下链接可能有帮助,它似乎是同样的问题:

http://comments.gmane.org/gmane.comp.lib.boost.user/64146

总结一下:您必须使用 boost 1.45 中包含的 bjam 版本

和:

不过,bjam 构建链接是不是错了 直接上面的1.45下载链接无法构建1.45?

根据该链接,不要使用 Boost 下载页面上的 Boost Jam 链接。 (即你的版本)

关于c++ - 使用 MinGW 构建 boost 给出 "argument error",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5010116/

相关文章:

c++ - 使用 boost::numeric_cast<double>(long) 是否有目的(即从 long 转换为 double)?

c++ - Boost MSM 仅处理内部转换

c++ - Boost.Log中的参数传递错误

qt - 如何告诉 qmake 对共享库使用 .dll.a 后缀

c++ - 使用 MinGW/Cygwin 的 NetBeans IDE 8 中的 C++ 自动完成不正确

c - 无法使用 MINGW 执行 C 程序

c++ - C++编译设计:安全地扩展类

c++ - 在 C++ 中转储十六进制 float

c++ - opengl:旋转椭圆

c++ - 类外的成员函数定义