On Thu, Aug 09, 2012 at 10:15:01PM -0400, Christian Henning wrote:
Hi there, compiling with the latest trunk version gives me the following linker error with the chrono lib:
libboost_chrono-vc100-mt-1_51.lib(chrono.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Factory.obj
Usually the solution is to recompile the lib with _ITERATOR_DEBUG_LEVEL=2 but the problem preservers. Can someone tell what wrong with compiling boost with:
bjam -j8 --toolset=msvc --without-mpi variant=debug link=static runtime-link=shared define=_CRT_NONSTDC_NO_DEPRECATE define=_CRT_SECURE_NO_DEPRECATE define=_SCL_SECURE_NO_DEPRECATE define="_ITERATOR_DEBUG_LEVEL=2" stage
Have you've disabled autolinking and are linking manually to the Boost libraries? What is your intent with defining _ITERATOR_DEBUG_LEVEL=2? Is it just trying to smash errors you don't know where they're from, or is it intentional to get iterator debugging in release mode? Your bjam command line builds the debug library, but your link command line indicates that you're linking against the release library. If you haven't messed around with the autolinker functionality, that means that your code is a Release build, and thus, links against the Release boost library. libboost_chrono-vc100-mt-1_51.lib : static Boost library with release runtime libboost_chrono-vc100-mt-gd-1_51.lib : static Boost library with debug runtime If you want to change the properties of how the release Boost build builds, you should probably build your build with variant=release. -- Lars Viklund | zao@acc.umu.se