Created attachment 101173 [details] example project I have a project with a custom qmake based build (I can't use qmake build but need the custom build system for some reason not important here). The build is done in a separate build directory and has a subproject (see attached example). The project layout is as follows: /home/fifr/test/test_project/test_project.pro /home/fifr/test/test_project/sub_project/sub_project.pro /home/fifr/test/test_project/sub_project/hello.c The build directory is /home/fifr/test/test_project_build The only custom build option is "compile" with calling "qmake ../test_project". If there is some bug in hello.c, the compile output looks as follows /home/fifr/test/test_project_build> make cd sub_project/ && ( test -e Makefile || /usr/lib/qt/bin/qmake /home/fifr/test/test_project/sub_project/sub_project.pro -o Makefile ) && /usr/bin/make -f Makefile make[1]: Verzeichnis „/home/fifr/test/test_project_build/sub_project“ wird betreten gcc -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I../../test_project/sub_project -I. -isystem /usr/include/qt -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o hello.o ../../test_project/sub_project/hello.c ../../test_project/sub_project/hello.c: In Funktion »main«: ../../test_project/sub_project/hello.c:4:5: Fehler: »i« nicht deklariert (erste Benutzung in dieser Funktion) i=0; ^ ../../test_project/sub_project/hello.c:4:5: Anmerkung: jeder nicht deklarierte Bezeichner wird nur einmal für jede Funktion, in der er vorkommt, gemeldet The problemt is that clicking on the error message "../../test_project/sub_project/hello.c:4:5: ..." opens the file "/home/fifr/test_project/sub_project/hello.c" (note the missing "test/" in the path). It seems as if the path to file "hello.c" is taken relative to the build directory "test_project_build" instead to its subdirectory "test_project_build/sub_project", which would be correct (but this is only a rough guess).
Sorry, made a mistake in the description of the the build configuration. It consists of the following settings build path: /home/fifr/test/test_project_build configuration: qmake ../test_project/test_project.pro compile: make
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
I've just tested the issue again, and I can still reproduce it. Note that you have to create the build-directory first (in my case /home/fifr/test/test_project_build) as Kdevelop does not create it for you if it does not exist. I've attached an archive of the example project I used. Note that it may contain some absolute path in the kdev4 project files, maybe they should be adapted to your local machine in order to reproduce the problem.
Created attachment 153161 [details] version 2 of example project