When g++ is not present on the system, kdevelop fails to deduce the builtin include path for the C++ headers. Reproducible: Always Steps to Reproduce: 1. Setup system with an alternative compiler such as clang but do not install g++. 2. Create a C++ project (the default CMake C++ console application template shows this for instance) 3. Open any C++ file with a standard header included. Actual Results: All instances of standard headers are underlined in red because they cannot be found. If you hover over the underlined header you notice that any explicit include directories from the CMake files are listed and possibly /usr/include but the builtin include directories such as /usr/include/c++/4.7.2 are not. Actually building the project is successful though. Installing g++ and restarting causes the builtin include paths to be recognized and all standard headers are found. Expected Results: Headers are found by default. An easy workaround is of course to install g++ which in most Linux distributions is a simple task.
Confirmed. Should be simple to fix, though.
Personally I would welcome if we could ask the project manager for default include paths... Especially for cross-compile projects the include paths are often quite different and currently never correct.
Well you can see this work... https://git.reviewboard.kde.org/r/117938/
Git commit 520869abe77fe7fa68f8995b8fd38f52217d3209 by Kevin Funk, on behalf of Luis Felipe Dominguez Vega. Committed on 05/05/2014 at 07:35. Pushed by kfunk into branch 'master'. Support for default include path and definitions on CLang compiler. When I compile Kdevelop using only in my Debian Testing Clang 3.4, the defaults include paths is not recognized. In the code I will see that the functions are only for GCC and MSVC, with this patch now with Clang are recognized both, the include paths, and standard definitions. REVIEW: 117938 FIXED-IN: 4.7 M +1 -1 languages/cpp/CMakeLists.txt M +5 -5 languages/cpp/setuphelpers.cpp R +79 -53 languages/cpp/setuphelpers_gcc_like.cpp [from: languages/cpp/setuphelpers_gcc.cpp - 059% similarity] M +1 -1 languages/cpp/tests/CMakeLists.txt http://commits.kde.org/kdevelop/520869abe77fe7fa68f8995b8fd38f52217d3209