Precisely I am using this command to build boost library

b2.exe toolset=msvc  --build-type=complete stage --with-test link=shared  threading=multi

build system i have uses vcxproj file. This file contains link to specific msvcrt.lib (~\cxCached\msvctool\msvcrt.lib)

i have visual studio 12 installed on my machine

so when i build boost it uses msvc12 and hence while debugging i see msvc012.dll in lm option .

however my project uses msvcrt.dll

since i am using header files allocation for boost object happens from msvcrt.dll and free happens from boost dll in tern msvcrt12.dll. This causes heap corruption.

Lorenzo mentioned that  vs  contains batch file  to update default  msvcrt  ,  what is the name of this batch file?  

the work around I used to solve this temporarily is move "new" to .ipp files. 




On Wed, Aug 19, 2015 at 11:37 PM, Vladimir Prus <vladimir.prus@gmail.com> wrote:
On 14-Aug-15 10:36 PM, Abhay Mhatre wrote:
is it possible to provide specific msvcrt.lib while building boost. It uses
default one and my build system uses the one specified in build system.
this causes heap corruption at the end of program termination.

Hi Abhay,

in a normal source build, you'll have several variants, whose naming is described at:

   http://www.boost.org/doc/libs/1_59_0/more/getting_started/windows.html#library-naming

If you pick the variant matching your projects, things should work fine.

Could you describe which MSVC runtime your project is using and which one is used
by Boost libraries you link to?

- Volodya



_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users