The system include path is not correctly initialized. The problem is that old gcc's (like 4.2.1 used on FreeBSD) has no -std option. gcc with that option return an error code and the output parsing doesn't happen Reproducible: Always Steps to Reproduce: 1. Launch KDevelop on FreeBSD 2. open a source file and system includes are not recognized 3.
Created attachment 70432 [details] This should fix the problem, using a compatible command line This patch should fix the problem. Tested on my system (FreeBSD8) Removing the -std=c++0x option shouldn't affect the output using newer version of gcc (tested with gcc 4.6)
hm while this will fix the include files, isn't the macro-getter in computeGccStandardMacros still broken then for these old gcc's? I'm thinking on making this a compile-time option... would that be OK for you?
ops, I didn't see the same definition on computeGccStandardMacros()... a compile-time options should work!
Created attachment 70446 [details] fallback to gcc-call without -std=cpp0x argument in case of error please try this patch, does that work for you? it will first run gcc with -std=c++0x and then fallback to a version without that argument in case of error. that should be better than a compile-time check since it's something we need to know at runtime.
I'm using it and includes and defines are correctly detected. I agree, a run-time check is preferable. thanks for the fast answer!
Git commit 5799abe3b73b5ee1cfda275e463529d47f35e77f by Milian Wolff. Committed on 17/04/2012 at 11:14. Pushed by mwolff into branch '4.3'. Fix gcc include-path and macro computation on machines with old GCC. Whe default to calling GCC with -std=c++0x and fallback to a call without that argument when the former fails. M +3 -2 languages/cpp/setuphelpers.cpp M +25 -4 languages/cpp/setuphelpers_gcc.cpp http://commits.kde.org/kdevelop/5799abe3b73b5ee1cfda275e463529d47f35e77f
Git commit 6b95b832d72696df0278ac7b9d290c96b798ef07 by Milian Wolff. Committed on 17/04/2012 at 11:14. Pushed by mwolff into branch '4.3'. Fix gcc include-path and macro computation on machines with old GCC. Whe default to calling GCC with -std=c++0x and fallback to a call without that argument when the former fails. M +3 -2 languages/cpp/setuphelpers.cpp M +25 -4 languages/cpp/setuphelpers_gcc.cpp http://commits.kde.org/kdevelop/6b95b832d72696df0278ac7b9d290c96b798ef07