在windows中使用cygwin64终端构建Boost1.61.0
Build Boost1.61.0 with cygwin64 terminal in windows
我今天尝试在windows10中使用cygwin64终端构建boost1.61.0的二进制文件。我按照boost官方指示一步一步,一切正常运行,直到最后一步 ./b2 install
然后系统返回如下错误信息:
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/kernel/modules.jam:107: in modules.call-in
ERROR: rule "<abi>ms" unknown in root module.
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/util/indirect.jam:98: in indirect.call
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/build/targets.jam:1054: in evaluate-requirements
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/build/targets.jam:1112: in common-properties2
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/build/targets.jam:977: in targets.common-properties
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/build/targets.jam:1303: in alias-target-class.generate
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0
/boostcpp.jam:432: in build-multiple
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0
/boostcpp.jam:394: in class@top-level-target.generate
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/build/targets.jam:774: in generate-really
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/build/targets.jam:746: in class@main-target.generate
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/build-system.jam:714: in load
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/kernel/modules.jam:295: in import
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/tools
/build/src/kernel/bootstrap.jam:139: in boost-build
/cygdrive/d/cygwin64/bin/%HOMEDRIVE%%HOMEPATH%/boost_1_61_0/
boost-build.jam:17: in module scope
这是bootstrap.log
:
###
### 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 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 pathunix.c
./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root= clean
...found 1 target...
...updating 1 target...
[DELETE] clean
...updated 1 target...
./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root=
...found 158 targets...
...updating 2 targets...
[COMPILE] bin.cygwinx86_64/b2.exe
[COPY] bin.cygwinx86_64/bjam.exe
...updated 2 targets...
cygwin64的版本是4.9.3
谁能告诉我发生了什么以及如何纠正它?谢谢你的帮助。
我一直在使用boost,但我从来不需要安装它。所以我要建议我的方式,你可以挑选(注意,我通常使用msvc编译器,所以我用gcc为你替换了每个msvc,如果我错了,请纠正我。如果您想使用msvc,请记住运行msvc命令提示符或在任何内容之前运行vcvarsall.bat:
你运行bootstrap:
bootstrap.bat gcc
然后编译:
b2 --build-type=complete stage runtime-link=static --toolset=gcc
是否要静态是你的选择。现在,您创建一个符号链接到您想要的位置。不需要在任何地方安装
由于在Windows中创建符号链接很麻烦,所以我打包了一些软件,只需右键单击就可以轻松创建符号链接。
相关文章:
- C++为构建时间获取QDateTime的可靠方法
- 无法在 CLion 中构建 C++ 项目
- 函数向量_指针有不同的原型,我可以构建一个吗
- 如何使用ndk-build.cmd构建Android.so文件
- libssh 的函数在构建 libssh 时无法在 Qt 和 cmake 错误中找到
- 使用cmake从源代码构建MySQL连接器/C++失败(与以前的声明冲突)
- VSCode-有一个红色下划线,但程序构建和运行正确,并且出现配音错误
- 构建可组合有向图(扫描仪生成器的汤普森构造算法)
- 无法使用Qt Creator在Windows中构建yaml-cpp
- 构建一个由C和C++文件组成的库
- llvm构建器向基本块添加终止符
- FLTK 2.0构建和演示,适用于VS2019的2011年左右的代码库
- 如何跨平台将二进制资源构建到程序中?
- 将 OpenCV 与 CMAKE 中的项目一起构建为第三方库的正确方法
- 如何解决 Ninja c++ 构建和执行问题
- 使用 cmake 的 LLVM 构建在 tsan_libdispatch_mac.cc 期间失败; "Error: conflicting types for ..."
- CMake WxWidgets项目成功地在Linux上构建,但没有在Windows上构建
- 更改命令行 qt5 源代码构建配置的正确/快速方法
- 用CMake构建C++协议
- 在windows中使用cygwin64终端构建Boost1.61.0