This forum has been archived. All content is frozen. Please use KDE Discuss instead.

System headers path

Tags: None
(comma "," separated)
Valerio
Registered Member
Posts
2
Karma
0

System headers path

Thu Aug 30, 2012 1:07 pm
I'm trying to use KDevelop for linux arm cross-compile development but I'm having a hard time making it use the correct system header files.
I'm working on a makefile based project.

I added the correct cross-compile toolchain c and c++ include folders in "Custom Include paths" but still, from time to time, it shows include files located in /usr/include or other host system folders.

Since in languages/cpp/setuphelpers_gcc.cpp gcc is used to obtain system include paths, I even tried to create symbolic links to my cross compile toolchain and add the path to PATH env variable, so that my cross compiler gcc ends up being used instead.
But no luck, still, sometimes, /usr/include... shows up in Code Browser.

The behaviour seems to be completely random and inconsistent.
For example if I open string header file from an #include <string> statement it correctly opens the cross compile toolchain version.
But then if I go through the include statements present in string header, #include <bits/stringfwd.h> is correctly mapped to my cross toolchain folders while #include <bits/c++config.h> ends up in a host system folder.

Is there a way to consistently exclude /usr folders from system include paths?

Thanks,
Valerio
User avatar
Milian Wolff
KDE Developer
Posts
61
Karma
1
OS

Re: System headers path

Fri Aug 31, 2012 1:46 pm
Cross compilation support is really suboptimal right now in KDevelop. That said, with your PATH + symlink technique it should work. Maybe the isssue you see are old files that have been parsed (and cached) before you tried this trick? Have you tried to wipe ~/.kdevduchain and start from scratch (with the PATH + symlink trick enabled)?

Oh, and just to be sure - you start KDevelop from the same cli where you did "export PATH=..." ?


current KDE projects: Quanta, KDevelop, Kate
Valerio
Registered Member
Posts
2
Karma
0

Re: System headers path

Fri Aug 31, 2012 3:14 pm
Milian,
thanks for the reply.

Yes KDevelop is started from the same cli.
I'll try to clean the cache, it seems a reasonable explanation for the strange behavior I'm seeing.

Thanks again,
Valerio


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell