-
Notifications
You must be signed in to change notification settings - Fork 127
Fixed the issue of C/C++ std headers not found #87
Conversation
…83ecfc6 In the FAQ of https://github.com/Valloric/YouCompleteMe, there was an issue of C++ standard library headers not found (ycm-core/YouCompleteMe#303) that has been resolved with a workaround, and @cpradog has kindly implemented it. However, this workaround has not yet been incorporated into template.py in https://github.com/rdnetto/YCM-Generator, so adding this becomes the main purpose of this fork.
Could you please verify that autocompletion continues to work under Linux with this change? (Docker is an easy way to get a test environment, if you have it setup, otherwise any old live CD should be fine.) Also, please target this PR at |
@rdnetto OK. Just tested on Ubuntu 14.04.4 with Vim 7.4.882, and everything works. The virtual machine to which I have easy access only has Ubuntu, so if you'd like to see more tests on, for example, Fedora or Debian, it'll have to wait. I'd be very grateful to whoever helps perform tests on these platforms. Can I simply change the base to ps. I updated the description in this pull request to make it clearer --- see if it eliminates your concerns. |
If it works under Ubuntu then it should be fine, assuming Clang hasn't made some breaking change since.
Just change the base on this page - stable lags develop, so you don't need to explicitly merge unless you have conflicts. |
@rdnetto Good, thanks. Just changed the base. Seems no conflict. |
Great, thanks for the PR. :) |
It fails when |
@theFool32 The generator should support both Python 2 and 3, and this change has been made earlier than my pull request; see commit 95b78ba. Without changing from [No write since last change]
env: python2: No such file or directory
shell returned 127 |
@leofang I'm sorry to the comment above since I consider your pull request makes the change. |
@theFool32 Since we now target both Python 2 and 3 (as of #86), any code which isn't compatible with both represents a bug. FWIW, supporting both is unavoidable, because Please open a separate bug for it and we can figure out how to fix this there. |
In the FAQ of Valloric/YouCompleteMe, there is an issue of C/C++ standard library headers not found that affects some users (mainly on OS X) and has been resolved with a workaround, and @cpradog has kindly provided a working implementation.
Basically, what this workaround does is to execute
echo | clang -v -E -x c++ -
, as instructed byYouCompleteMe
, extract the paths to where the standard headers reside, and append to the include path generated by.ycm_extra_conf.py
. Therefore, it will not interfere with other functionalities.Since rdnetto/YCM-Generator is recommended to use in the front page of Valloric/YouCompleteMe, it's probably worth incorporating this workaround for users' convenience.
Also, the 1st line
#!/usr/bin/env python2
inconfig_gen.py
is not universal, so it's changed to#!/usr/bin/env python
.