build boost with specific msvcrt.lib
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. thanks
On 8/14/2015 3: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.
Boost is 120+ libraries and a dozen or so tools. What do you mean by "building boost" ? Executing b2 from the top-level directory ?
yes I am using b2.exe to build boost test binary for msvc toolset.
On Monday, August 17, 2015, Edward Diener
On 8/14/2015 3: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.
Boost is 120+ libraries and a dozen or so tools. What do you mean by "building boost" ? Executing b2 from the top-level directory ?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 8/19/2015 10:31 PM, Abhay Mhatre wrote:
yes I am using b2.exe to build boost test binary for msvc toolset.
What do you mean by "build boost test binary" ? Are you running 'b2' from the Boost top-level directory ? Are you specifying a toolset when you run 'b2" ? Are you using the latest Boost from Github or are you using a specific release of Boost ? The only sure way of having Boost use your specific msvcrt.lib is having your specific version of msvcrt.lib found first during the build process.
On Monday, August 17, 2015, Edward Diener
mailto:eldiener@tropicsoft.com> wrote: On 8/14/2015 3: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.
Boost is 120+ libraries and a dozen or so tools. What do you mean by "building boost" ? Executing b2 from the top-level directory ?
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#libra... 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
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
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#libra...
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
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@lists.boost.org ; vladimir.prus@gmail.com ; lknain@nc.rr.com ; trivelli.lorenzo@konvergence.it ; 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
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.
thanks
_____________________________________ sorry, do you mean that you have multiple VS instances in your machine and you want to use a specific one ? if it is the case, usually VS has a batch in the VC directory which sets all the needed
Il 14/08/2015 21:36, Abhay Mhatre ha scritto: path for the specificed version, so it should be the case. else, it sounds a bit unusual that building everything with the same compiler leads to heap corruption... it may sound silly, but have you checked that you are the build system is all the same for each of ht ecomponents you are building ? regards Lorenzo
To use a specific VS version there was a toolset option for the build. I have not done it since about 1.45. It always seemed to take some trial and error attempts to get the name right for the toolset for me. I think the option is still mentioned in the :Getting started” doc. It still required setting the environment correctly with the batch file or similar as Lorenzo mentioned. Larry From: Lorenzo Trivelli Sent: Thursday, August 20, 2015 7:50 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] build boost with specific msvcrt.lib Il 14/08/2015 21:36, Abhay Mhatre ha scritto: 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. thanks _____________________________________sorry, do you mean that you have multiple VS instances in your machine and you want to use a specific one ? if it is the case, usually VS has a batch in the VC directory which sets all the needed path for the specificed version, so it should be the case. else, it sounds a bit unusual that building everything with the same compiler leads to heap corruption... it may sound silly, but have you checked that you are the build system is all the same for each of ht ecomponents you are building ? regards Lorenzo -------------------------------------------------------------------------------- _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (5)
-
Abhay Mhatre
-
Edward Diener
-
Larry
-
Lorenzo Trivelli
-
Vladimir Prus