Re: Redirecting cout to a TextBuffer



On Sun, 11 May 2008, Milosz Derezynski wrote:

I don't really know anything about Windows programming but i'd imagine the
Windows C runtime offers an stdout and stderr the same way as under *nix.

Oh, if that were true everyone would be a lot happier.

It depends on which flags you give the compiler.

I use mingw32 to cross compile. If you give it -mwindows you don't get stdout/stderr/stdin and you also don't get a nasty empty console window when you invoke the program from Explorer.

What actually happens when you try to use stderr/stdout from a -mwindows program also varies depending on version of mingw and version of windows. Sometimes your bytes just get ignored, sometimes an exception is raised, sometimes the program tight loops, sometimes it burns your toast and scares your cat.

Charlie - Metropolis Data Consultants - 07976 028167 - 01223 763758



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]