MinGw編譯Boost

來源:互聯網
上載者:User
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中啟動並執行。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.