金庆的专栏

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  423 随笔 :: 0 文章 :: 454 评论 :: 0 Trackbacks
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中运行的。
posted on 2013-01-09 14:10 金庆 阅读(2596) 评论(0)  编辑 收藏 引用 所属分类: 1. C/C++

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理