I'm new to Qt and used the example project xmlstreamlint. When I do a printf in main I see the output when I run the application from QT Creator. But when I navigate to the debug directory and run the exe from a command shell I see no output.
I searched the internet for hours and tried things like this:
//freopen ("/dev/tty", "a", stdout);
QTextStream(stdout) << "string to print" << endl;
qStdOut() << "Hallo\n";
std::cout << "\nHello World!\n";
std::cout << "Hallo" <<endl;
freopen crashes when run from QT Creator and it doesn't when running the exe from command shell.
My project file looks like this (it comes from the example)
CONFIG += console
CONFIG -= app_bundle
QT -= gui
QT += xml
SOURCES += main.cpp
target.path = $$[QT_INSTALL_EXAMPLES]/xml/xmlstreamlint
INSTALLS += target
I need help. Absolutely no output when executed from the command shell. Even with qDebug().
Maybe the wrong exe? I found xmlstreamlint.exe in
and the date is updated each time I build.
That kills me...
Thanks for any ideas.