-
Notifications
You must be signed in to change notification settings - Fork 309
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
clang_complete is ignoring compiler flags in compile_commands.json #564
Comments
Does your |
It was not. |
The rest of my configuration:
Function just gets the path of the compile_commands.json file. It's at the root of the project but I was getting errors when I opened source files in subdirectories. |
I've never tried using compilation database, maybe see #165, there was some discussion about absolute vs. relative paths. |
FWIW, I don't know if the compile database support is in the clang_complete plugin or the clang library, but I gave up on this. I just switched to the .clang_complete file. It's simple enough as long as you are writing the code and giving paths relative to the main include directory i.e.
which is plenty simple. |
An example of my compile_commands.json file generated by using cmake/clang
clang_complete ignores the -std=gnu++14 and the -DOS_LINUX and generates errors because of them.
Setting
g:clang_user_options='-std=gnu++14 -DOS_LINUX'
in my .vimrc fixes the issue.The text was updated successfully, but these errors were encountered: