起初,我尝试使用以下命令构建安装了 MinGW 和 Microsoft Visual C++ 的 Boost:
bootstrap.bat mingw
.\b2
在构建过程中,我收到了大量日志行,表明构建是针对 Visual C++ (msvc) 完成的。所以我停止了它,我完全卸载了 Visual C++(使用 Windows 实用程序),我删除了 Boost 目录,我从 bz2 文件重新创建了它,我检查了g++.exe
在 PATH 中,我重新输入前两个命令从头开始重新安装 Boost。
我不断获得 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)
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.
这些文件实际上已经丢失。他们不应该是 MinGW 的一部分吗?
使用 mingw 构建 boost
打开窗户cmd
cd
给你的boost_1_53_0
folder.
获得干净的路径环境
输入(更改为您的 mingw 路径)
set PATH=C:\mingw\bin
测试:输入
path
输出 :PATH=C:\mingw\bin
type
bootstrap mingw
引导程序完成后,
然后更改以下命令以满足您的需要。
type
.\b2 --build-dir=C:\boost-mingw toolset=gcc variant=debug link=shared runtime-link=shared
还有其他方法可以增强动力。但以上步骤应该足够了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)