Compiler not including /usr/include of QNX sysroot

I’m wondering if anyone else has had this problem. My compile comands get a very small subset of system include folders added from the QNX sysroot path (i.e. C:/qnx710/target/qnx7). You can see below that only the usr/include/io and usr/include/c++/v1 subfolders are added to the compile-line include path. I would expect plain old usr/include would get added automatically as well. Is there something I’m missing? If I’m not mistaken the source file should only need to do this: #include <rpc/rpc.h> to be able to include the file found at C:/qnx710/target/qnx7/usr/include/rpc/rpc.h

FWIW I have the same issue whether I use a Windows host or a Linux host. I’m using CMake 3.21.

C:\\qnx710\\host\\win64\\x86_64\\usr\\bin\\q++.exe -Vgcc_ntoarmv7le -Wc,-isysroot,C:/qnx710/target/qnx7 -lang-c++ -DCMAKE_BUILD -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NOSTANDARDSHELL_UI_MODEL -DQT_NO_ACCESSIBILITY -DQT_NO_CLIPBOARD -DQT_NO_NATIVE_GESTURES -DQT_NO_WINCE_NUIOUSER -DQT_NO_WINCE_SHELLSDK -DQT_QML_LIB -DQT_SVG_LIB -DUNICODE -D_FORTIFY_SOURCE=2 -D_REENTRANT -D_UNICODE -IC:/Projects/build-AEPP-Qt6_2_4_QNX_Arm-Debug/eSW/Qt/QtCommon/BCControls/BCControls_autogen/include -IC:/qnx710/target/qnx7/usr/include/io -IC:/qnx710/target/qnx7/usr/include/c++/v1 -IC:/Projects/AEPP/./BSPs/QNX7/BSP/src/hardware/startup/lib/public/arm -IC:/Projects/AEPP/eSW/Qt/QtCommon/BCControls -IC:/Qt/6.2.4/qnx71_armv7/include/QtQml/6.2.4 -IC:/Qt/6.2.4/qnx71_armv7/include/QtQml/6.2.4/QtQml -IC:/Qt/6.2.4/qnx71_armv7/include/QtCore/6.2.4 -IC:/Qt/6.2.4/qnx71_armv7/include/QtCore/6.2.4/QtCore -Wp,-isystem,C:/Qt/6.2.4/qnx71_armv7/include/QtCore -Wp,-isystem,C:/Qt/6.2.4/qnx71_armv7/include -Wp,-isystem,C:/Qt/6.2.4/qnx71_armv7/mkspecs/qnx-armle-v7-qcc -Wp,-isystem,C:/Qt/6.2.4/qnx71_armv7/include/QtQml -Wp,-isystem,C:/Qt/6.2.4/qnx71_armv7/include/QtNetwork -Wp,-isystem,C:/Qt/6.2.4/qnx71_armv7/include/QtSvg -Wp,-isystem,C:/Qt/6.2.4/qnx71_armv7/include/QtGui -g -g -fPIC -fno-operator-names -Wall -Werror -Wno-error=format= -Wno-error=sequence-point -Wno-error=unknown-pragmas -Wno-error -std=gnu++17 -o eSW\\Qt\\QtCommon\\BCControls\\CMakeFiles\\BCControls.dir\\.rcc\\qmlcache\\BCControls_BCThreeStateCheckbox_qml.cpp.o -c C:\\Projects\\build-AEPP-Qt6_2_4_QNX_Arm-Debug\\eSW\\Qt\\QtCommon\\BCControls\\.rcc\\qmlcache\\BCControls_BCThreeStateCheckbox_qml.cpp

To be thorough I’ll link to this question with a QNX support request.

Aaaand I’m an idiot. The source file was in fact not using #include <rpc/rpc.h> but #include <rpc.h>. Once I changed it the file was found. There must be some implicit checking of the usr/include path such that it doesn’t need to be explicitly added to the compile line.

My bad.