{"id":283,"date":"2008-01-17T00:03:41","date_gmt":"2008-01-16T23:03:41","guid":{"rendered":"http:\/\/mattiesworld.gotdns.org\/weblog\/2008\/01\/17\/redirecting-error-output-on-windows-console\/"},"modified":"2008-01-17T00:03:41","modified_gmt":"2008-01-16T23:03:41","slug":"redirecting-error-output-on-windows-console","status":"publish","type":"post","link":"https:\/\/mattiesworld.gotdns.org\/weblog\/2008\/01\/17\/redirecting-error-output-on-windows-console\/","title":{"rendered":"Redirecting error output on windows console"},"content":{"rendered":"<p>I thought I already blogged this, but I can&#8217;t find it back, so let me try one more try as I seem to need this from time to time and then fail to remember the correct syntax! \ud83d\ude42<\/p>\n<p>The scenario is: you have this huge error output on your console (for example a very long compiler error). Since it is quite long, console history is not big enough to see the beginning. You could of course increase the history size, but it&#8217;s not a real solution. Everyone knows how to redirect console output to a file, simply like this: <\/p>\n<p><code><verbatim>type myhugefile.txt > output.txt<\/verbatim><\/code><\/p>\n<p>This is all nice and dandy, except, it doesn&#8217;t capture the error output (stderr) (which is exactly what we&#8217;re interested in ;)). You have to do some win32 console-fu as follows:<\/p>\n<p><code><verbatim>mingw32-make 1> output.txt 2>&1<\/verbatim><\/code><\/p>\n<p>This tells the shell to redirect standard output (stdout) to output.txt and redirect error output to standard output.<\/p>\n<p>You can read all this information in a nice collegebook format on <a href=\"http:\/\/support.microsoft.com\/kb\/110930\/en-us\">MS&#8217;s KB<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I thought I already blogged this, but I can&#8217;t find it back, so let me try one more try as I seem to need this from time to time and then fail to remember the correct syntax! \ud83d\ude42 The scenario is: you have this huge error output on your console (for example a very long &hellip; <a href=\"https:\/\/mattiesworld.gotdns.org\/weblog\/2008\/01\/17\/redirecting-error-output-on-windows-console\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Redirecting error output on windows console<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,7],"tags":[],"class_list":["post-283","post","type-post","status-publish","format-standard","hentry","category-tweaking","category-windows"],"_links":{"self":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/comments?post=283"}],"version-history":[{"count":0,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/283\/revisions"}],"wp:attachment":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/media?parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/categories?post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/tags?post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}