Setting up Qt for QNX on VMware
-
wrote on 10 Jan 2022, 21:09 last edited by
I am trying to set up Qt for QNX. I was following this YouTube video:
When I hit the Test button, I get the following error:
Checking if specified ports are available...
Error gathering ports: Remote process failed; exit code was 1.
Remote error output was: sh: cannot create /var/run/qtc.3.pid: No such file or directoryAny idea what this means?
-
wrote on 11 Jan 2022, 13:04 last edited by
All the communication from Qt Creator to the QNX VM is done via ssh.
I have found it very useful to get the extra information from this communication.
You can set the environment variable
QT_LOGGING_RULES=qtc.ssh*=true
before starting Qt Creator.I have found out that on my QNX VM I didn't have the
/var/run
directory, and when Qt Creator tried to create the pid file it failed.Make sure you log to your QNX VM and issue a
mkdir -p /var/run
before doing theTest
in Qt Creator. -
wrote on 12 Jan 2022, 23:46 last edited by QNXuser
Thank you! It all worked out.
I added a kit in the options like this:
with the compilers defined as:
When I build the project, I get 94 errors, some of them are:
I added the path of libraries mentioned in the error in the .pro file and then ran Build-->Run qmake but got the same errors. Here is how I added the libraries:
INCLUDEPATH += \ C:\Users\ehsan\qnx710\target\qnx7\x86_64\lib INCLUDEPATH += \ C:\Users\ehsan\qnx710_2\target\qnx7\x86_64\usr\lib INCLUDEPATH += \ C:\Qt\5.14.2\qnx7_x86_64\lib
What am I missing?
-
wrote on 13 Jan 2022, 19:34 last edited by
I assume you meant
LIBS
and notINCLUDEPATH
.Those shared libraries are part of the QNX sysroot.
You need to have them installed via the QNX software manager so that you can build against, and when you create your VM you need to have something like:
@######################################### @## more libraries @######################################### @/lib/libfreetype.so.1=usr/lib/libfreetype.so.1 @/lib/libpng16.so.0=usr/lib/libpng16.so.0
So that you have the libraries in the VM to be able to run your Qt application. Or package them alongside your application.
1/4