X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmain.cpp;h=65a9f4d8d7da10e7537ea51fbb53d49ef3afb355;hb=869247b6;hp=659c9e074b6a59f00858cac4fe8c07d4be4b131f;hpb=9abb7db46800e554f57e865a3e768602ffd9d6f1;p=features.git diff --git a/src/main.cpp b/src/main.cpp index 659c9e074b..65a9f4d8d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * \author Jean Marc Lasgouttes * * Full author contact details are available in file CREDITS. @@ -14,7 +14,6 @@ #include "LyX.h" #include "support/debug.h" -#include "support/gettext.h" #include "support/os.h" #include @@ -22,6 +21,11 @@ #include #endif +#ifdef WIN32 +#include +#endif + + using namespace std; @@ -31,17 +35,20 @@ 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); + } + SetConsoleOutputCP(CP_UTF8); +#endif + // To avoid ordering of global object problems with some // stdlibs we do the initialization here, but still as // early as possible. lyx::lyxerr.setStream(cerr); - LYXERR0("acssdc"); - - lyx::support::os::init(argc, argv); - - // initialize for internationalized version *EK* - lyx::locale_init(); + lyx::support::os::init(argc, &argv); lyx::LyX the_lyx_instance;