3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Jean Marc Lasgouttes
9 * Full author contact details are available in file CREDITS.
16 #include "support/debug.h"
17 #include "support/os.h"
32 int main(int argc, char * argv[])
35 ios_base::sync_with_stdio(false);
39 if (AttachConsole(ATTACH_PARENT_PROCESS)) {
40 freopen("CONOUT$", "w", stdout);
41 freopen("CONOUT$", "w", stderr);
43 SetConsoleOutputCP(CP_UTF8);
46 // To avoid ordering of global object problems with some
47 // stdlibs we do the initialization here, but still as
49 lyx::lyxerr.setStream(cerr);
51 lyx::support::os::init(argc, &argv);
53 lyx::LyX the_lyx_instance;
55 return the_lyx_instance.exec(argc, argv);