Version: 3.9.91 (using 4.2.1 (KDE 4.2.1) "release 108", KDE:KDE4:Factory:Desktop / openSUSE_11.1) Compiler: gcc OS: Linux (x86_64) release 2.6.27.19-3.2-default I've create a custom makefile project from a folder containing C++ source code. When I open any source file, the "Problems" tab is filled with "Included file not found: <filename.h>" messages and many #include directives are underscored with red. The source code in question is cross-platform and vpaths are used in the makefile to resolve location of platform-specific header. This was not an issue for Kdevelop3 due to the a ability to specify custom include paths in project configuration. Please add support for this feature - or at least provide a way to disable red underscoring.
not going to happen anytime soon as we don't have anybody that wants to work on custom makefile support right now.
Does any other project type (currently) supported by kdevelop4 support custom include paths?
Just rechecked in Kdevelop3 - custom include paths are not a custom makefile project-specific option. It was a normal project option under "Project->Project Options->C++ support->Code Completion". I assume you still have someone willing to work on C++ code completion support? :-)
The system changes drastically in KDevelop4. C++ support expects the buildsystem to provide the right include paths. Even more so as we don't have any "completion databases" anymore. The only well-maintained buildsystem in KDevelop4 currently is CMake and that one supplies the needed include paths from the CMakeLists.txt files.
Sadly, that makes the currently available KDevelop4 fairly useless for anyone with a non-CMake based build. I have always thought the custom makefile project support in kdevelop3 was a killer feature not available in other IDEs.
@Andreas please remember: There is the include-path resolver, and it can resolve include-paths from makefiles. I'm tired of having to correct you every single time this subject comes up. @Vadym Krevs: There is a tool within KDevelop that can resovle the include-paths from custom makefiles by doing a call to "make". This works in many cases, but in some it doesn't. If you have built kdevelop4, you can test it on the command-line with the binary "kdev_includepathresolver". It currently fails if the source-files are in a subfolder of their actual Makefile. Apart from that, we're planning to implement a generic way of setting custom include-paths. It's not high priority for me personally, but the kdev4 user "Thorben Kröger" told me that he wanted to work on it soon.
Kdevelop3 had no "custom makefile" support, it had "custom buildsystem" support. Which might not come back at all. The problem is that we simply lack the manpower to work on more than having good Qt4/KDE4/CMake support at the moment.
(In reply to comment #6) > @Andreas please remember: There is the include-path resolver, and it can > resolve include-paths from makefiles. I'm tired of having to correct you every > single time this subject comes up. I'm well aware of that hack, but as you know yourself its nothing more and there apparently also exist enough "corner cases" in which it doesn't work.
Created attachment 31801 [details] Custom makefile project screenshot from kdevelop3 Hmm, then what is this selected thingy?
@Andreas: Yes but it's not that many corner-cases. Actually only one I know of. Already now it works with automake-projects, cmake-projects, unsermake-projects, and simple custom makefile projects. Once that subdirectory-thing is fixed, this should cover 90% of all makefile projects. For the rest, we can allow the users to specify custom include paths.
@Vadym: Well, what do you expect from "custom makefile support"? KDevelop4 will allow you to use a project with custom makefiles, and will allow having code-completion on it. In worst case you will have to specific the include paths by yourself. The only thing it won't offer is GUI management features for a custom makefile project.
(In reply to comment #9) > Created an attachment (id=31801) [details] > Custom makefile project screenshot from kdevelop3 > > Hmm, then what is this selected thingy? You didn't understand me. The so-called "custom makefile" support in KDevelop3 actually supported any kind of buildsystem (I'm using that here with a totally custom, in-house buildsystem). And the KDevelop3 custom makefile-support didn't support specifying custom include paths at all, that was part of the C++ support in KDevelop3.
(In reply to comment #10) > @Andreas: Yes but it's not that many corner-cases. Actually only one I know of. > Already now it works with automake-projects, cmake-projects, > unsermake-projects, and simple custom makefile projects. Once that > subdirectory-thing is fixed, this should cover 90% of all makefile projects. > For the rest, we can allow the users to specify custom include paths. What about out-of-source builds? Unless I'm mistaken it even can't support that without some additional support from the buildsystem.
Oh, btw, just to have this written down somewhere: The problem is not so much adding a GUI to specify a list of include dirs for a given project. The problem is that this only works for the simpler projects. In real world apps you'll want to have this list on at least a per-build-folder basis, possibly even on a per-compiled-file basis. Else you'd easily confuse the C++ parser, if you have headers with the same name from two include-dirs included in two different cpp files. So implementing this properly is not quite easy unfortunately, apart from needing support for specifying a builddir first.
I hear what you're saying, gents. IMHO, ability to specify a list of include dirs for a given project would be a good step in the right direction. If this is difficult to do, then at least provide a way to turn off red underscoring of unresolved #include's, etc. @David Nolden, comment #11: Parity with Kdevelop3 would make me very happy - ability to specify and build my own makefile, customizable make environments in order to be able to do debug/release build, popup-based word completion and ctags-based symbol lookup, ability to click on an error/warning in build output and be transferred to the right line in the affected file.
@Andreas comment #13: It does support out of source builds. Of course it needs to know the build directory for that, else there is no way, because that contains the Makefiles.
I've taken the time to make the include path resolver work with source files in sub-directories. Also it's now possible to specify custom include paths: Just create a ".kdev_include_path" file in the source directory that contains the paths. Now we just need to allow setting a build-directory for custom makefile projects.
Sorry I miswrote the filename. It should be ".kdev_include_paths".
What's the syntax for contents of .kdev_include_files? Each include path on separate line?
this bug is not fixed, we have a workaround which is nice. But at some point we need a real fix. Re-opening.
@Vadym: Yes, but look exactly at the filename
There seems also to be a UI screen that pops up if the path resolver couldn't locate it -- however that seems to be the only way to get to that screen.
Given comment 22, isn't this fixed?
I consider it fixed, maybe it can be improved but now you're able to add include directories.