[英]build Boost in release mode
那就是Boost 1.55.0。
在Cygwin Shell中,在cmd /c "bootstrap.bat"
,我的命令是:
./b2 variant=release runtime-debugging=off -sICU_PATH=z:/icu-installed -sICU_LINK="/LIBPATH:z:\\icu-installed\\lib sicuuc.lib sicudt.lib sicuin.lib " --prefix=z:/boost-installed toolset=msvc link=static --without-python --reconfigure install
輸出:
link.jam: No such file or directory
Performing configuration checks
- 32-bit : yes
- arm : no
- mips1 : no
- power : no
- sparc : no
- x86 : yes
- has_icu builds : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
...
在bin.v2/config.log
,我得到了:
...found 8 targets...
...updating 7 targets...
common.mkdir bin.v2
common.mkdir bin.v2\libs
common.mkdir bin.v2\libs\context
common.mkdir bin.v2\libs\context\config
common.mkdir bin.v2\libs\context\config\msvc-12.0
common.mkdir bin.v2\libs\context\config\msvc-12.0\debug
compile-c-c++ bin.v2\libs\context\config\msvc-12.0\debug\32.obj
32.cpp
...updated 7 targets...
...found 2 targets...
...updating 1 target...
...
common.mkdir bin.v2\libs\regex\build\msvc-12.0\debug
compile-c-c++ bin.v2\libs\regex\build\msvc-12.0\debug\has_icu_test.obj
has_icu_test.cpp
...
msvc.link bin.v2\libs\regex\build\msvc-12.0\debug\has_icu.exe
sicuuc.lib(udata.ao) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in has_icu_test.obj
sicuuc.lib(udata.ao) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in has_icu_test.obj
...
因此,由於某種原因,它在那里使用了調試設置。
如何在發布模式下構建Boost?
還是僅在Debug模式下進行配置測試,而其余的實際上在Release模式下進行? 但是為什么呢? 以及如何在調試模式下進行配置測試?
在這種情況下, has_icu
失敗,因為我已經在發布模式( /MD
)中構建了該lib。
我發現BlueGo工具對於構建增強功能非常有用。 您可以配置發布/調試模式,也可以選擇其他配置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.