Qt6 on QNX: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
This page covers the process of building and deploying Qt6 for QNX 7.1.
This page covers the process of building and deploying Qt6 for QNX 7.1.


=== Preparing the SDP ===
=== QNX SDP ===


In order to get the full-set of Qt features make sure the following packages are installed for your target (x64 or arm)
In order to build applications for a QNX target, one needs to download and install the QNX SDP, which contains the QNX toolchain for ''x86_64'', ''armle-v7'' and ''aarch64le'', as well as a collection of tools to aid the creation of QNX system images for select targets and virtual machines. A ''myQNX'' account and a valid license are required in order to obtain the QNX SDP. You can create a new account [https://www.qnx.com/account/login.html#showcreate here].
 
Once an account has been created, you'll need to download the QNX Software Center, from which the QNX SDP can be downloaded.
 
==== Installing the SDP ====
 
From within QNX Software Center, select the following packages:


* QNX Software Development Platform 7.1 [com.qnx.qnx710] - this may appear as a baseline inside the QNX Software Center
* QNX Software Development Platform 7.1 [com.qnx.qnx710] - this may appear as a baseline inside the QNX Software Center
Line 10: Line 16:
* QNX SDP 7.1 Time Zone Database [com.qnx.qnx710.osr.zoneinfo]
* QNX SDP 7.1 Time Zone Database [com.qnx.qnx710.osr.zoneinfo]
* QNX SDP 7.1 Image Codecs [com.qnx.qnx710.target.screen.img_codecs]
* QNX SDP 7.1 Image Codecs [com.qnx.qnx710.target.screen.img_codecs]
==== Using the SDP ====
The QNX SDP ships with a GCC based compiler called QCC. Before this compiler can be used, we need to setup the environment. This is done by sourcing <code>qnx710/qnxsdp-env.sh</code> on Linux or invoking <code>qnx710/qnxsdp-env.bat</code> on Windows. These scripts set a few important environment variable, including:
* '''QNX_HOST''' - the base path for the QNX tools and compiler for the host operating system
* '''QNX_TARGET''' - the base path for the source, binary and configuration files that are used (deployed) to the target QNX system
Once the environment has been setup, you can invoke the QNX compiler driver to produce a binary (qcc for C, q++ for C++), specifying the target architecture using the -V command line switch, for instance:
qcc -Vgcc_ntoaarch64le foo foo.c # ''builds an aarch64le binary''
q++ -Vgcc ntox86_64 bar bar.cpp  # ''builds a x86_64 binary (the default when -V is omitted)''
'''IMPORTANT INFORMATION:''' QCC does not handle paths containing whitespace well. It's best to avoid them altogether.

Revision as of 01:11, 22 June 2022

This page covers the process of building and deploying Qt6 for QNX 7.1.

QNX SDP

In order to build applications for a QNX target, one needs to download and install the QNX SDP, which contains the QNX toolchain for x86_64, armle-v7 and aarch64le, as well as a collection of tools to aid the creation of QNX system images for select targets and virtual machines. A myQNX account and a valid license are required in order to obtain the QNX SDP. You can create a new account here.

Once an account has been created, you'll need to download the QNX Software Center, from which the QNX SDP can be downloaded.

Installing the SDP

From within QNX Software Center, select the following packages:

  • QNX Software Development Platform 7.1 [com.qnx.qnx710] - this may appear as a baseline inside the QNX Software Center
  • QNX SDP 7.1 DejaVu Fonts [com.qnx.qnx710.target.screen.fonts.dejavu]
  • QNX SDP 7.1 Font Engine [com.qnx.qnx710.target.screen.fonts.engine]
  • QNX SDP 7.1 Time Zone Database [com.qnx.qnx710.osr.zoneinfo]
  • QNX SDP 7.1 Image Codecs [com.qnx.qnx710.target.screen.img_codecs]

Using the SDP

The QNX SDP ships with a GCC based compiler called QCC. Before this compiler can be used, we need to setup the environment. This is done by sourcing

qnx710/qnxsdp-env.sh

on Linux or invoking

qnx710/qnxsdp-env.bat

on Windows. These scripts set a few important environment variable, including:

  • QNX_HOST - the base path for the QNX tools and compiler for the host operating system
  • QNX_TARGET - the base path for the source, binary and configuration files that are used (deployed) to the target QNX system

Once the environment has been setup, you can invoke the QNX compiler driver to produce a binary (qcc for C, q++ for C++), specifying the target architecture using the -V command line switch, for instance:

qcc -Vgcc_ntoaarch64le foo foo.c # builds an aarch64le binary
q++ -Vgcc ntox86_64 bar bar.cpp  # builds a x86_64 binary (the default when -V is omitted)

IMPORTANT INFORMATION: QCC does not handle paths containing whitespace well. It's best to avoid them altogether.