Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS Mojave] Best way to find C++ headers (memory, vector) and /usr/local/lib headers ? #87

Open
the-drunk-coder opened this issue May 27, 2020 · 0 comments

Comments

@the-drunk-coder
Copy link

Hi,

I'm running Emacs with CCLS on Linux and MacOS Mojave. On Linux the experience is fairly smooth, but on macOS I'm running into some problems. I'm using an executable wrapper as recommended in the Wiki, but I had to make some modifications to get it somewhat up and running ... here it is:

#!/bin/sh
exec /usr/local/bin/ccls -init='{"clang":{"extraArgs":[
"-stdlib=libc++",
"-std=c++17",
"-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include",
#"-isysroot", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include",
"-I", "/usr/local/include",
"-I", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1"
]}}' "$@"

Without the explicit reference to the C++ headers and /usr/local/include, the headers aren't found at all. With the references, the headers are found but unique_ptr and make_unique etc. aren't completed and show up as red. The -isysroot line doesn't really make a difference.

Plus, all files basically end with an error message saying:
ccls: no member named 'value' in 'std::__1::__is_default_allocator***

In total, the experience isn't all that satisfying on macOS ... is there a way to improve it ?

Best,
N

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant