]> git.lyx.org Git - features.git/blobdiff - src/main.cpp
Fix cut and paste error
[features.git] / src / main.cpp
index 5c4fb468459dbc3fa2a7ab12bbf418d1b6f7674e..94b1ccd64603e7accc4427f7dc72eeb39eb469af 100644 (file)
 #include <ios>
 #endif
 
+#ifdef WIN32
+#include <Windows.h>
+#endif
+
+
 using namespace std;
 
 
@@ -30,6 +35,13 @@ int main(int argc, char * argv[])
        ios_base::sync_with_stdio(false);
 #endif
 
+#ifdef WIN32
+       if (AttachConsole(ATTACH_PARENT_PROCESS)) {
+               freopen("CONOUT$", "w", stdout);
+               freopen("CONOUT$", "w", stderr);
+       }
+#endif
+
        // To avoid ordering of global object problems with some
        // stdlibs we do the initialization here, but still as
        // early as possible.