D13613: RFC: Fix libclang default include paths on FreeBSD.
Aaron Puchert
noreply at phabricator.kde.org
Sat Jun 23 01:27:01 UTC 2018
aaronpuchert added a comment.
I guess this comes from the second test row ("ignore-moc-at-end")? I'm not sure if `<vector>` includes system headers, but I replaced it with `<cstdlib>`, which obviously includes `<stdlib.h>` from `/usr/include`. That still works here.
Apparently `/usr/include/c++/v1` contains files with the same names as the system headers, for example stdlib.h, which includes another stdlib.h. There are not so many wrappers on my machine, `/usr/include/c++/8/*.h` matches only six files. But among them is stdlib.h, which includes `/usr/include/stdlib.h` with this weird `#include_next` mechanism.
stdlib.h:
#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
# include_next <stdlib.h>
#else
# include <cstdlib>
// ...
cstdlib:
// Need to ensure this finds the C library's <stdlib.h> not a libstdc++
// wrapper that might already be installed later in the include search path.
#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#include_next <stdlib.h>
#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS
That doesn't seem to be a problem.
What does KDevelop say when you include `<vector>`? Does it show any problems? I can install libc++ on my system, but I'm not sure how I could convince DUChain/libclang to use it.
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D13613
To: arrowd, #kdevelop, mwolff
Cc: mwolff, aaronpuchert, kdevelop-devel, antismap, iodelay, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180623/9c7e9e60/attachment.html>
More information about the KDevelop-devel
mailing list