]> git.lyx.org Git - features.git/blob - src/main.cpp
Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
[features.git] / src / main.cpp
1 /**
2  * \file main.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  * \author Jean Marc Lasgouttes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "support/debug.h"
15 #include "LyX.h"
16 #include "support/gettext.h"
17
18 #include "support/os.h"
19
20 #include <iostream>
21 #ifdef HAVE_IOS
22 #include <ios>
23 #endif
24
25 int main(int argc, char * argv[])
26 {
27 #ifdef HAVE_IOS
28         std::ios_base::sync_with_stdio(false);
29 #endif
30
31         // To avoid ordering of global object problems with some
32         // stdlibs we do the initialization here, but still as
33         // early as possible.
34         lyx::lyxerr.setStream(std::cerr);
35
36         lyx::support::os::init(argc, argv);
37
38         // initialize for internationalized version *EK*
39         lyx::locale_init();
40
41         lyx::LyX the_lyx_instance;
42
43         return the_lyx_instance.exec(argc, argv);
44 }