Additional console window
I have application that has to write to console. Also I call function from dll that writes to stdout too. Now I开发者_高级运维 want to have separate output window to get all output from dll there. (So I will have 2 console windows: one for client app, one for dll) How to make it? I use windows+mingw
You can't. stdout
is a single file handle and if both your application code and the dll are writing to it, they're going to go to the same place no matter what you do.
Your best options would be to either:
- change your application code to write to something besides stdout (i.e stderr or a file), or
- change your application code so that its output statements are 'tagged' in a way that you can filter using a tool like grep or sed/awk
精彩评论