【问题标题】:build boost with mingw from QtSDK使用来自 QtSDK 的 mingw 构建提升
【发布时间】:2012-04-15 14:29:36
【问题描述】:

我想在 QtCreator 中使用 boost。我正在使用 Windows 7 并安装了带有 mingw 的 QtSDK。当我执行bootstrap.bat 时出现以下错误

C:\boost\boost_1_49_0>bootstrap
Building Boost.Build engine
'cl' is not recognized as an internal or external command,
operable program or batch file.

Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

bootstrap.log 包含以下内容

###
### Using 'msvc' toolset.
###

C:\boost\boost_1_49_0\tools\build\v2\engine>if exist bootstrap rd /S /Q bootstrap 

C:\boost\boost_1_49_0\tools\build\v2\engine>md bootstrap 

C:\boost\boost_1_49_0\tools\build\v2\engine>cl /nologo /GZ /Zi /MLd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG kernel32.lib advapi32.lib user32.lib /Febootstrap\jam0  command.c compile.c debug.c execnt.c expand.c filent.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c md5.c pwd.c class.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.cmodules/sequence.c modules/order.c 

我的第一个猜测是 boost 尝试使用 MSVC 而不是 mingw 构建,但我不知道如何改变这种行为。一些帮助将不胜感激。

【问题讨论】:

    标签: c++ qt boost mingw


    【解决方案1】:

    在找到这个question 后,我尝试了bootstrap.bat gcc,但由于未找到gcc 而导致错误。看一眼path 环境变量,发现QtSDK\mingw\bin 的路径丢失了,因为QtSDK 没有添加它。

    解决办法很简单

    path = %PATH%;C:\QtSDK\mingw\bin
    bootstrap.bat gcc
    .\b2 --toolset=gcc
    

    【讨论】:

      猜你喜欢
      • 2018-09-12
      • 1970-01-01
      • 1970-01-01
      • 2012-10-20
      • 1970-01-01
      • 2014-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多