]> git.lyx.org Git - lyx.git/blobdiff - src/main.C
more cursor dispatch
[lyx.git] / src / main.C
index cc7462ff88487478eb2196ae50c15fa1c1507e15..ba4637edfed9601bf781367b083d6b762d08d2c0 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <config.h>
 
+#include "debug.h"
 #include "lyx_main.h"
 #include "gettext.h"
 #include "support/os.h"
 #include <ios>
 #endif
 
-using namespace lyx::support;
+
+namespace os = lyx::support::os;
 
 int main(int argc, char * argv[])
 {
 #ifdef HAVE_IOS
        std::ios_base::sync_with_stdio(false);
 #endif
+       // To avoid ordering of global object problems with some
+       // stdlibs we do the initialization here, but still as
+       // early as possible.
+       lyxerr.rdbuf(std::cerr.rdbuf());
 
        os::init(&argc, &argv);
 
        // initialize for internationalized version *EK*
        locale_init();
 
-       LyX lyx(argc, argv);
+       LyX::exec(argc, argv);
        return 0;
 }