无法使用MinGW构建Boost,它寻找Visual C++

Pie*_*tro 3 installation boost mingw boost-build

起初我尝试使用以下命令构建安装了MinGW和Microsoft Visual C++的Boost:

bootstrap.bat mingw
.\b2
Run Code Online (Sandbox Code Playgroud)

在构建过程中,我有大量的日志行,表明正在为Visual C++(msvc)完成构建.所以我停止了它,我完全卸载了Visual C++(使用Windows实用程序),我删除了Boost目录,我从bz2文件重新创建它,我检查了它g++.exe是在PATH中,我重新输入前两个命令重新安装从头开始提升.

我一直在建立一个msvc构建......还有什么我可以做的吗?


Windows控制台
从日志中可以看出,没有选择任何配置:

> .\b2

Building the Boost C++ Libraries.

Performing configuration checks

    - 32-bit                   : no  (cached)
    - 64-bit                   : no  (cached)
    - arm                      : no  (cached)
    - mips1                    : no  (cached)
    - power                    : no  (cached)
    - sparc                    : no  (cached)
    - x86                      : no  (cached)
    - has_icu builds           : no  (cached)
Run Code Online (Sandbox Code Playgroud)

MinGW控制台

$ ./bootstrap.sh

###
### Using 'gcc' toolset.
###
rm -rf bootstrap
mkdir bootstrap
gcc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.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 class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c
builtins.c:34:23: fatal error: sys/wait.h: No such file or directory
compilation terminated.
execunix.c:20:26: fatal error: sys/resource.h: No such file or directory
compilation terminated.
fileunix.c:96:17: fatal error: ar.h: No such file or directory
compilation terminated.
Run Code Online (Sandbox Code Playgroud)

这些文件实际上已丢失.他们不应该成为MinGW的一部分吗?

mos*_*o-x 7

通过mingw建立提升

打开的窗口cmd
cd你的boost_1_53_0文件夹.

获取干净的路径环境
类型(更改为mingw路径)

set PATH=C:\mingw\bin
Run Code Online (Sandbox Code Playgroud)

测试:类型

path
Run Code Online (Sandbox Code Playgroud)

输出: PATH=C:\mingw\bin

类型

bootstrap mingw
Run Code Online (Sandbox Code Playgroud)

引导程序完成后,请
更改以下命令以满足您的需要.
类型

.\b2 --build-dir=C:\boost-mingw toolset=gcc variant=debug link=shared runtime-link=shared
Run Code Online (Sandbox Code Playgroud)

还有其他方法来构建提升.但是上面的步骤应该足够了.