Boost logo

Boost Users :

Subject: Re: [Boost-users] Using the /RTC option without specifying a debug runtime will lead to linker errors
From: Igor R (boost.lists_at_[hidden])
Date: 2011-12-28 10:03:26


> I’m trying to track down a very nasty stack corruption bug in my release
> code and therefore I would like to enabled the Visual C++ RTCs option to
> enable runtime stack checks in my release build, however when I try to do
> this I get an “Incompatible build options” error from the boost libraries.
> Specifically I get this from boosts AutoLink.hpp:
>
>
>
> #if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
>
> #  pragma message("Using the /RTC option without specifying a debug runtime
> will lead to linker errors")
>
> #  pragma message("Hint: go to the code generation options and switch to one
> of the debugging runtimes")
>
> #  error "Incompatible build options"
>
> #endif
>
>
>
> It seems to be suggesting that in order to use /RTC I need to do a Debug
> build, buts that’s exactly what I don’t want to do… I need to enable Runtime
> Checks in the Release build!

"/RTC cannot be used with compiler optimizations "
http://msdn.microsoft.com/en-us/library/8wtf2dfz(v=VS.100).aspx


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