I’m linking a static library that has a std::cout wrapper that works if I use it from the application code, but non of the library’s internal outputs (used in exactly the same fashion) show any output.
Maybe it’s not important, but I’m using Qt Creator and qmake project files to build. I have added console to the application’s CONFIG (and even tried that for the static library, but it had no effect).
What could be going wrong and how can I fix this? Thanks!
UPDATE: well, the wrapper is an adapted version of this one:
The
std::coutwrapper won’t be able to ‘reach in’ to another library implicitly. Have you thought about redirectingcoutaltogether? Something likesrc:That way you’d have control over data fed to
std::cout, regardless of the library doing the output (unless, of course, they redirectstd::coutthemselves.)