Boost logo

Boost Users :

Subject: Re: [Boost-users] build boost with specific msvcrt.lib
From: Larry (lknain_at_[hidden])
Date: 2015-08-21 15:45:42


vcvars32.bat is in the VC subdirectory of VS.

In the older scheme of things toolset=msvc would get you the most current MSVC. To get an older one you had to be more specific with the version number (I am not where I can actually look) but something like msvc-9.0 for VS 2008 I think.

Larry

From: Abhay Mhatre
Sent: Friday, August 21, 2015 12:39 PM
To: boost-users_at_[hidden] ; vladimir.prus_at_[hidden] ; lknain_at_[hidden] ; trivelli.lorenzo_at_[hidden] ; Edward Diener
Subject: Re: [Boost-users] build boost with specific msvcrt.lib

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_at_[hidden]> 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_at_[hidden]
  http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net