0
点赞
收藏
分享

微信扫一扫

MinGw编译Boost

眸晓 2023-06-15 阅读 75


MinGw编译Boost

(金庆的专栏)

在MinGw Shell中运行bootstrap.sh失败

Jinq@jinqing-pc /d/src/boost_1_52_0
$ bootstrap.sh toolset=gcc
Building Boost.Build engine with toolset gcc...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
 


bootstrap.log显示如下: 


###
### Using 'gcc' toolset.
###
rm -rf bootstrap
mkdir bootstrap
gcc -o bootstrap/jam0 command.c compile.c constants.c debug.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 pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.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:33:23: 致命错误:sys/wait.h:No such file or directory
编译中断。
execunix.c:17:26: 致命错误:sys/resource.h:No such file or directory
编译中断。
fileunix.c:98:17: 致命错误:ar.h:No such file or directory
编译中断。 



按照 http://lists.boost.org/boost-users/2011/06/69016.php 

解决如下: 

Jinq@jinqing-pc /d/src/boost_1_52_0/tools/build/v2/engine
$ ./build.sh mingw
Jinq@jinqing-pc /d/src/boost_1_52_0/tools/build/v2/engine/bin.ntx86
$ cp b2.exe /d/src/boost_1_52_0
Jinq@jinqing-pc /d/src/boost_1_52_0
$ b2 toolset=gcc stage



按照 https://svn.boost.org/trac/boost/ticket/4884#comment:10
可能正确的方法是在cmd.exe窗口中运行bootstrap.bat来生成b2.exe.
不过这样就需要另外设置gcc的路径。
bootstrap.sh是不支持在MinGW Shell中运行的。

举报

相关推荐

0 条评论