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

using compile_commands.json cannot find system includes #445

Closed
dirvine opened this issue Jul 11, 2013 · 2 comments
Closed

using compile_commands.json cannot find system includes #445

dirvine opened this issue Jul 11, 2013 · 2 comments

Comments

@dirvine
Copy link

dirvine commented Jul 11, 2013

i.e. no etc.
This issue requires that as far as I can tell you
1: create the json fiel and then with vim do something like

:%s/-w /-I\.usr\/include\/c++\/v1 -w /g 

2: Have cmake do this by explicitly stating the dir in CmakeLists.txt (which is not recommended)

Is it possible to
a: Have ycm use installed clang
b: Allow additional flags to be passed when using json [this may prove useful for other reasons i.e. unsetting flags if necessary with -fno- etc.]
c: Fix the bug :-)

Thanks for the so far excellent tool though, it's very cool.

I hope this makes sense.

@Valloric
Copy link
Member

I think this is a duplicate of #303.

The underlying problem is that compiling something through libclang does not use the default system include paths, but compiling it through clang does. Maddening, isn't it?

@dirvine
Copy link
Author

dirvine commented Jul 12, 2013

Just fyi I resorted to creating my own flags and adding to the flags section, it seems that the json approach for now will cause problems that cannot be overcome (.h files etc). Yea it is maddening, but I suppose it's how it is, even so fantastic lib chap, great job indeed. I agree with the dup/close as well, sorry I never looked more closely.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants