[Qt-creator] Compilation Database project not showing files
Andrzej Telszewski
andrzej at telszewski.com
Sun Jun 15 15:49:18 CEST 2025
Hello,
tested in QtC 16.0.2 and 17.0.0-rc1.
I have the following *compile_commands.json* (stripped contents) file:
[
(...),
{
"directory": "/home/atelszewski/playground/tmp/zephyrproject/builddir",
"command":
"/home/atelszewski/proj/tools/bin/zephyr-sdk/zephyr-sdk-0.17.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-DCORE_CM4 -DHSE_VALUE=32000000 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0
-DPICOLIBC_LONG_LONG_PRINTF_SCANF -DSTM32WB55xx -DUSE_FULL_LL_DRIVER
-DUSE_HAL_DRIVER -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START
-D__ZEPHYR__=1
-I/home/atelszewski/playground/tmp/zephyrproject/builddir/zephyr/include/generated/zephyr
-I/home/atelszewski/playground/tmp/zephyrproject/zephyr/include
-I/home/atelszewski/playground/tmp/zephyrproject/builddir/zephyr/include/generated
-I/home/atelszewski/playground/tmp/zephyrproject/zephyr/soc/st/stm32
-I/home/atelszewski/playground/tmp/zephyrproject/zephyr/soc/st/stm32/common/.
-I/home/atelszewski/playground/tmp/zephyrproject/zephyr/drivers
-I/home/atelszewski/playground/tmp/zephyrproject/zephyr/soc/st/stm32/stm32wbx/.
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/cmsis/CMSIS/Core/Include
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/cmsis_6/CMSIS/Core/Include
-I/home/atelszewski/playground/tmp/zephyrproject/zephyr/modules/cmsis_6/.
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/soc
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/stm32/stm32cube/stm32wbxx/drivers/include
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/stm32/stm32cube/common_ll/include
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/ti/mspm0/source/ti/devices/msp/.
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/ti/mspm0/source/ti/devices/msp/m0p
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/ti/mspm0/source/ti/devices/msp/peripherals
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/ti/mspm0/source/ti/devices/msp/peripherals/m0p
-I/home/atelszewski/playground/tmp/zephyrproject/modules/hal/ti/mspm0/source/ti/devices/msp/peripherals/m0p/sysctl
-isystem
/home/atelszewski/playground/tmp/zephyrproject/zephyr/lib/libc/common/include
-fno-strict-aliasing -Os -imacros
/home/atelszewski/playground/tmp/zephyrproject/builddir/zephyr/include/generated/zephyr/autoconf.h
-fno-printf-return-value -fno-common -g -gdwarf-4
-fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs
-mfp16-format=ieee -mtp=soft
--sysroot=/home/atelszewski/proj/tools/bin/zephyr-sdk/zephyr-sdk-0.17.1/arm-zephyr-eabi/arm-zephyr-eabi
-imacros
/home/atelszewski/playground/tmp/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h
-Wall -Wformat -Wformat-security -Wno-format-zero-length
-Wdouble-promotion -Wno-pointer-sign -Wpointer-arith
-Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int
-fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec
-fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop
-fmacro-prefix-map=/home/atelszewski/playground/tmp/zephyrproject/zephyr/samples/basic/blinky=CMAKE_SOURCE_DIR
-fmacro-prefix-map=/home/atelszewski/playground/tmp/zephyrproject/zephyr=ZEPHYR_BASE
-fmacro-prefix-map=/home/atelszewski/playground/tmp/zephyrproject=WEST_TOPDIR
-ffunction-sections -fdata-sections -specs=picolibc.specs -std=c99 -o
CMakeFiles/app.dir/src/main.c.obj -c
/home/atelszewski/playground/tmp/zephyrproject/zephyr/samples/basic/blinky/src/main.c",
"file":
"/home/atelszewski/playground/tmp/zephyrproject/zephyr/samples/basic/blinky/src/main.c"
},
(...)
]
but for some reason, *main.c* is not presented in the project explorer
(see attached) image.
Actually, only a few files are presented in the project explorer.
(In the full contents compile_commands.json there are a couple more of
them.)
What could be the reason?
Apparently, the *symbol lookup* works, because if I type *: main* I am
actually pointed at the *main()* implementation in *main.c*.
Thanks for your assistance!
--
Best regards,
Andrzej Telszewski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20250615/657e95e0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compile_commands_missing_project_files.png
Type: image/png
Size: 8658 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20250615/657e95e0/attachment.png>
More information about the Qt-creator
mailing list