QtCreator upload/run doesn't work for QNX
-
I'm attempting to use QtCreator to launch a simple test program on my Qnx target. In the device options, I've configured my QNX (7.0.0) device, and running the "Test" button produces "Device test finished successfully."
In my project settings, under the "Run" actions for my QNX kit, I configured "Upload files via SFTP", and cleared the "incremental deployment" flag.
When I attempt to run my project, the binary file is uploaded to the target as expected, but is not run.
The message shown is:
"warning: Failed to retrieve remote timestamp for file [...] Incremental deployment will not work. Error message was: sh: stat: cannot execute - No such file or directory"I can ssh to my target and run the uploaded file, but QtCreator won't run it.
There is no "stat" command available on QNX, and the GNU coreutils package (which includes stat) does not compile easily on QNX.
If I've turned off "incremental deployment", QtCreator shouldn't need to make the check that is failing.
-
Thanks for the reply. I'm using Qt Creator 4.11.1, running on Linux.
I think I stumbled across the solution. I had "Run in terminal" checked under the Run configuration section. Cleared that option, and my program runs! I still see the warning from the deploy step, but it's not fatal.
I think we can call this solved.
-
After further testing, the issue isn't the "run in terminal" setting.
Instead, it seems that if I'm using the QtQuick/QML stuff, then QtCreator reports the following:
11:16:51: Starting /tmp/QmlTest/bin/QmlTest ...
11:16:51: Application finished with exit code 0.i.e. it runs, but exits immediately, with no error code.
If I then ssh into my target and manually run the same binary, I see the expected output on the screen, and it doesn't exit until I kill it with ^C.
I don't see this issue if I run an QtWidget application.
The C++ launcher for the QmlTest application is below. The contents of the QML file doesn't seem to matter.
#include <QGuiApplication>
#include <QQuickView>int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);QQuickView *view = new QQuickView; view->setSource(QUrl(QLatin1String("qrc:/main.qml"))); view->show(); return app.exec();
}