首先,我尝试使用以下命令构建安装了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的一部分吗?
答案 0 :(得分:7)
使用mingw构建提升
打开窗口cmd
cd
到boost_1_53_0
文件夹。
获得干净的路径环境
输入(改为你的mingw路径)
set PATH=C:\mingw\bin
测试:输入
path
输出:PATH=C:\mingw\bin
输入
bootstrap mingw
bootstrap完成后,
然后改变以下命令以满足您的需求
型
.\b2 --build-dir=C:\boost-mingw toolset=gcc variant=debug link=shared runtime-link=shared
还有其他方法可以构建提升。但上述步骤应该足够了。