Answer the question
In order to leave comments, you need to log in
What is the reason for the strange behavior when trying to write to std::cerr, the code throws out std::bad_cast?
In general, I encountered a very strange error. There is such a file - logger.cpp . There is a DEBUG_PRINT_1 macro - common_definitions.hpp (although this is not important, because bad_cast is thrown out in other cases as well).
Everywhere in the code where it occurs:
DEBUG_PRINT_1("что-то");
exception std::bad_cast takes off.
The strangest thing is that this only happens on Mac OS X. I tried to compile clang and gcc of different versions, plus on different versions of Mac OS X 10.6.7 and 10.7.3 - the same everywhere. But on Ubuntu and Windows everything works fine.
What could it be? Bug in Mac OS X? And how to get around it?
Answer the question
In order to leave comments, you need to log in
1) Where is the log written? if to a file, then try to output to cout
2) Is it some kind of library or what? If so, are they compiled with an application with completely identical keys?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question