發生此錯誤時,bootstrap.bat不會生成它所說的錯誤日誌,因此基本上是無用的。但是,卸載Microsoft Visual C++會導致dll錯誤消失,並且會生成日誌文件。它顯示它試圖使用msvc來構建項目而不是gcc。所以不像在一些指南中給出的方向,你必須在此時指定工具包:
bootstrap.bat gcc
然後它會提示你運行一個名爲B2可以與選項(等等)建立文件。
b2 --build-dir=C:\exampledir toolset=gcc
看來爲了提升使用,你必須在<builddir>\boost\bin.v1\libs\system
明確添加文件。否則,你得到這樣的錯誤:通過將項目
In function `_static_initialization_and_destruction_0':|
C:\removed\boost_1_49_0\boost\system\error_code.hpp|214|undefined reference to `boost::system::generic_category()'|
C:\removed\system\error_code.hpp|215|undefined reference to `boost::system::generic_category()'|
C:\removed\boost_1_49_0\boost\system\error_code.hpp|216|undefined reference to `boost::system::system_category()'|
連接選項可以在代碼塊中找到 - >編譯選項 - >鏈接設置 - >添加。即使將構建目錄添加到鏈接程序搜索目錄,顯式添加這些庫似乎也是必需的。