diff --git a/src/main.c b/src/main.c index 3515639..2a164f8 100644 --- a/src/main.c +++ b/src/main.c @@ -30,10 +30,20 @@ #include "config.h" +#ifdef WIN32 +# include +#endif + #include -int main(int ac, char **av) { - Elk_Init(ac, av, 1, ""); +int main (int ac, char **av) { +#ifdef WIN32 + AllocConsole (); + freopen ("CONIN$", "r", stdin); + freopen ("CONOUT$", "w", stdout); + freopen ("CONOUT$", "w", stderr); +#endif + Elk_Init (ac, av, 1, ""); return 0; }