glog
glog copied to clipboard
logging_fail fail for x64 in VS2013, libglog_static
The following code will fail to compile in logging.cc under VS2013 x64 for libglog_static because _asm is no longer supported.
static void logging_fail() {
#if defined(_DEBUG) && defined(_MSC_VER)
// When debugging on windows, avoid the obnoxious dialog and make
// it possible to continue past a LOG(FATAL) in the debugger
_asm int 3
#else
abort();
#endif
}
If I change the code to this, the code will compile but when I use glog and fire a LOG(FAIL) in a debugger I will get the R6010 abort() dialog box.
#if defined(_DEBUG) && defined(_MSC_VER) && defined(_M_IX86)
What is the fix for R6010 that will also work for VS2013 x64?
Found on this website: http://blog.csdn.net/fksec/article/details/44341531 You may want to replace the inline assembly code:
_asm int 3
with:
__debugbreak();