kdev-clang not finding included files

Francis Herne mail at flherne.uk
Sun Jul 10 13:17:30 UTC 2016


On Sun, 10 Jul 2016 13:46:24 +0200
Sven Brauch <mail at svenbrauch.de> wrote:

> Hey,
> 
> the biggest problem I'm still having with kdev-clang is that it
> sometimes decides that some include file is missing now, and then
> doesn't do much any more (see attached screenshot). I think Aleix said
> he has that issue as well.
> Not finding "stdlib.h" is one case; the other one, which I find a bit
> easer to understand, is it not finding one of the generated
> "fooexport.h" files. The latter case happens for example if a file
> from, say, kdev-python includes a file from kdevplatform, and
> kdevelop picks that up from the open kdevplatform project. My
> impression is that it tries to parse the included files with the
> include paths of the current project; which of course doesn't include
> the build dir of the project the file is actually in, and thus
> doesn't find the generated fooexport.h file of course.
> Does that ring any bells for anyone? Is that suspicion correct and if
> yes what can we do about it?
> 
> I tried looking into the code, but it's not super simple to understand
> what happens, so I figured I would ask around before digging deeper.
> 
> Best regards,
> Sven

This is a consistent problem for me too.

Include paths don't seem to work reliably for subdirectories:
 - Adding /usr/include/kdevplatform/ to the list doesn't
    find /usr/include/kdevplatform/{foo}/{foo}export.h
 - Adding /usr/include/kdevplatform/{foo}/ does.

So I've worked around it by adding every subdirectory to the include
list, at which point KDevelop stops complaining, but that's kinda silly.

-Francis


More information about the KDevelop-devel mailing list