简体   繁体   中英

build Boost in release mode

That is with Boost 1.55.0.

In a Cygwin shell, after cmd /c "bootstrap.bat" , my command is:

./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

Output:

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
...

In bin.v2/config.log , I get this:

...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
...

So, for some reason, it uses Debug settings there.

How can I build Boost in Release mode?

Or are just the config test builds in Debug mode and the rest would actually be in Release mode? But why is that? And how can I also have the config test builds in Debug mode?

Esp., in this case, has_icu fails because I have build that lib in Release mode ( /MD ).

I find BlueGo tool quite helpful for building boost. You can configure Release/Debug modes and select other configurations too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM