Custom kit (self-compiled Qt 5.9) : features.h not found
-
Hello,
I am on Ubuntu Xenial.
I need to step in qt sources to debug an application (github.com/pgmodeler/pgmodeler), so I compiled a debug version of Qt 5.9, and registered qtversion and the kit accordingly.When debugging with pre-compiled Qt, there is no source parsing issue and the call stack :
qglobal.h -> type_traits -> c++config.h -> os_defines.h -> features.h is correctly found.However with the above custom kit, the source parser does not find features.h.
It is in /usr/include/. in my system, this GNU c header comes from libc6-dev package.
I browsed the web for ansers, tried to add "INCLUDEPATH+=/usr/include" in my .pro file, in the qtcreator projects tab, even in each subfolder makefiles, nothing did it.Any clue?
Best regards, Maxime -
This was really dumb...
Setting, as per : https://forum.qt.io/topic/95523/qt-creator-clang-code-model-doesn-t-find-types-even-though-code-compiles/8 , in Tools->Options->Kits :- CMAKE_SYSROOT:STRING=/ in CMake Configuration,
- System root : /
Solved it.
BR, Maxime
-
Hello,
I am on Ubuntu Xenial.
I need to step in qt sources to debug an application (github.com/pgmodeler/pgmodeler), so I compiled a debug version of Qt 5.9, and registered qtversion and the kit accordingly.When debugging with pre-compiled Qt, there is no source parsing issue and the call stack :
qglobal.h -> type_traits -> c++config.h -> os_defines.h -> features.h is correctly found.However with the above custom kit, the source parser does not find features.h.
It is in /usr/include/. in my system, this GNU c header comes from libc6-dev package.
I browsed the web for ansers, tried to add "INCLUDEPATH+=/usr/include" in my .pro file, in the qtcreator projects tab, even in each subfolder makefiles, nothing did it.Any clue?
Best regards, Maxime@maxzor I forgot to mention that other subfolders in /usr/include are well taken account of, like libxml2 and postgresql. they have the -isystem option.
I tried both -isystem (issue with order, does not compile) and -I (compiles fine but the parsing issue is still here). -
This really is an issue with the source parser : compilation is no problem with either kit.
Switching project in the "projects" tab make the parsing error come and go, as you can see :
https://youtu.be/gFIWa-Bmsp0Is it a problem that must be solved before compiling, related to qbs, or after, related to Clang code model?
-
-
This was really dumb...
Setting, as per : https://forum.qt.io/topic/95523/qt-creator-clang-code-model-doesn-t-find-types-even-though-code-compiles/8 , in Tools->Options->Kits :- CMAKE_SYSROOT:STRING=/ in CMake Configuration,
- System root : /
Solved it.
BR, Maxime