Boost logo

Boost Users :

Subject: [Boost-users] Using the /RTC option without specifying a debug runtime will lead to linker errors
From: Sleat, Ben (Ben.Sleat_at_[hidden])
Date: 2011-12-28 06:08:57


Hi

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!

Is there any way to get this to work in a release build that uses boost?

Does anyone know the details of the incompatibility? Surely /RTC doesn't require all linked in DLLs also to be compiled with /RTC?

Thanks in advance.

Ben

This email is from Verint Systems UK Ltd and is confidential.
If you have received it in error, please advise us and then delete the original and any attachments it may have contained.
Verint Systems UK Ltd does not accept any responsibility for viruses.
Verint Systems UK Ltd is a limited company registered in England and Wales at 241 Brooklands Road, Weybridge, Surrey KT13 0RH ,registration number 2602824.
VAT registration number GB566153238.



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