Boost 1.54不安装也不安装

Boost 1.54不安装也不安装,boost,compilation,mingw,installation,Boost,Compilation,Mingw,Installation,我一直在尝试使用MinGW(4.8.1)在Windows7x64上编译和安装boost 它显示为引导正常: bootstrap.bat mingw 给出: Building Boost.Build engine Bootstrapping is done. To build, run: .\b2 To adjust configuration, edit 'project-config.jam'. Further information: - Command line

我一直在尝试使用MinGW(4.8.1)在Windows7x64上编译和安装boost

它显示为引导正常:

bootstrap.bat mingw
给出:

Building Boost.Build engine

Bootstrapping is done. To build, run:

    .\b2

To adjust configuration, edit 'project-config.jam'.
Further information:

    - Command line help:
    .\b2 --help

    - Getting started guide:
    http://boost.org/more/getting_started/windows.html

    - Boost.Build documentation:
    http://www.boost.org/boost-build2/doc/html/index.html
看起来不错。然后,我尝试使用以下命令构建和安装:

b2 variant=release threading=multi toolset=gcc --with-date_time --with-filesystem
--with-iostreams --with-locale --with-program_options --with-regex --with-system
--with-thread --prefix=D:\boost install
但这只会产生一个无用的信息:

...found 2 targets...
但是,如果我不选择安装选项,我需要的库会生成,但不会安装。我一直在谷歌上搜索,但我就是找不到任何关于我错在哪里的线索。事实上,外面的一切似乎都表明安装选项工作得很好


如果我构建,然后使用安装选项再次运行,我会从b2获得相同的“找到2个目标”响应。

在使用MinGW 4.8.1的64位Windows 7上,这种情况会发生。如果我用MinGW-w64 4.8.1替换MinGW 4.8.1,则该过程工作正常

我测试的环境没有其他变化,只有不同的MinGW版本


碰巧我想把所有的东西都移到mingw-w64上使用sjlj异常,所以一切都很好。不知道为什么它在“标准”mingw下不工作。

如果您看到
的错误…找到了2个目标…
这意味着您在gcc(MinGw)的路径/设置方面有问题。只需在您的系统上重新安装MinGw。我建议使用与处理器相同的位系统。然后在系统环境中设置包含g++的bin文件夹的路径,使。。。文件夹。现在你准备好出发了

  • 出于明显的原因,请启动一个新的终端(cmd.exe),不要使用不知道新设置的已打开的终端

  • 下载boost(最新的稳定版本),解压缩它,并在命令窗口中跟随提取的boost主目录的路径

  • 运行以下命令:
    bootstrap mingw

  • 之后运行此命令,该命令将安装在您选择的目标文件夹中

    b2安装--前缀=c:\boost\1.54.0\gcc工具集=gcc

  • 需要一段时间耐心:)