QtCreator can't find headers (stm15 target)
-
Hi. I installed QtCreator using instructions here: Digi stm157 Install QT. I can create a project and it will compile and run on the target. But the linter doesn't seem to be using the right headers. I know this is common problem, but the solutions seem to be all over the place and none I've tried have been successful. I think the kit is at least marginally right because the compile step output looks right:
20:59:05: Starting: "/bin/make" -j16 /opt/dey/4.0-r6/ccmp15-dvk/sysroots/x86_64-deysdk-linux/usr/bin/uic ../qtSTM/mainwindow.ui -o ui_mainwindow.h arm-dey-linux-gnueabi-g++ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -c -pipe -O2 -pipe -g -feliminate-unused-debug-types --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -g -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../qtSTM -I. -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtWidgets -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtGui -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtCore -I. -I. -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/mkspecs/linux-oe-g++ -o main.o ../qtSTM/main.cpp arm-dey-linux-gnueabi-g++ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -pipe -O2 -pipe -g -feliminate-unused-debug-types --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -g -std=gnu++1z -Wall -Wextra -dM -E -o moc_predefs.h /opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/mkspecs/features/data/dummy.cpp arm-dey-linux-gnueabi-g++ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -c -pipe -O2 -pipe -g -feliminate-unused-debug-types --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -g -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../qtSTM -I. -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtWidgets -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtGui -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtCore -I. -I. -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/mkspecs/linux-oe-g++ -o mainwindow.o ../qtSTM/mainwindow.cpp /opt/dey/4.0-r6/ccmp15-dvk/sysroots/x86_64-deysdk-linux/usr/bin/moc -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include /home/dallas/scratch/build-qtSTM-arm_linux_generic_elf_32bit-Debug/moc_predefs.h -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/mkspecs/linux-oe-g++ -I/home/dallas/scratch/qtSTM -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtWidgets -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtGui -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtCore -I. -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/c++/11.4.0 -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/c++/11.4.0/arm-dey-linux-gnueabi -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/c++/11.4.0/backward -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/x86_64-deysdk-linux/usr/lib/arm-dey-linux-gnueabi/gcc/arm-dey-linux-gnueabi/11.4.0/include -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/arm-dey-linux-gnueabi/11.4.0/include -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/x86_64-deysdk-linux/usr/lib/arm-dey-linux-gnueabi/gcc/arm-dey-linux-gnueabi/11.4.0/include-fixed -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include ../qtSTM/mainwindow.h -o moc_mainwindow.cpp arm-dey-linux-gnueabi-g++ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -c -pipe -O2 -pipe -g -feliminate-unused-debug-types --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -g -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../qtSTM -I. -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtWidgets -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtGui -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/include/QtCore -I. -I. -I/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/mkspecs/linux-oe-g++ -o moc_mainwindow.o moc_mainwindow.cpp arm-dey-linux-gnueabi-g++ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now --sysroot=/opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi -o qtSTM main.o mainwindow.o moc_mainwindow.o /opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/libQt5Widgets.so /opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/libQt5Gui.so /opt/dey/4.0-r6/ccmp15-dvk/sysroots/cortexa7t2hf-neon-vfpv4-dey-linux-gnueabi/usr/lib/libQt5Core.so -lGLESv2 -lpthread 20:59:06: The process "/bin/make" exited normally. 20:59:06: Elapsed time: 00:02.
and like I said, it runs on the target hardware as expected. Here is a screenshot of the offensive editor window:
I did add a link to the SYSROOT in the Kit Manager:
as it was empty out of the box and after I added that there were less errors, but it is clearly not right, just wrong in a different way.
The host in my case is Ubuntu 22.04 and I am running version 9.02 of QtCreator (per Digi's instructions). The environment vars from the shell all look to be appropriate for the toolchain etc.
I guess what I'm really wondering is how the IDE determines where to find the header files etc it uses for linting and how I might go about configuring them properly.
Thx for any suggestions,
-Dallas -
As an update, I installed qtcreator from the ubuntu repo (13.0.2) and it works much better. Are there config files somewhere I can diff against the previous install to better understand the original problem?