I set g:ycm_global_ycm_extra_conf in my vimrc.
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
After including a c++11 header unordered_map, I got 'unordered_map' file not found reported by Syntastic plugin.
After adding
'-I',
'/usr/include/c++/4.2.1/tr1/'
in flags in .ycm_extra_conf, now my problem is solved.
In default .ycm_extra_conf, the environment didn't include any c++11 headers, but the argument -std=c++11 still in flags?
I think it's strange. Something should be wrong.
I use the mac os 10.7.5 (Lion) and the following is report by :YcmDebugInfo command, hope it helps.
-- Flags for /Users/cebrusfs/test.cpp loaded from /Users/cebrusfs/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py:
-- ['-Wall', '-Wextra', '-Werror', '-Wc++98-compat', '-Wno-long-long', '-Wno-variadic-macros', '-fex
ceptions', '-DNDEBUG', '-DUSE_CLANG_COMPLETER', '-std=c++11', '-x', 'c++', '-isystem', '/Users/cebru
sfs/.vim/bundle/YouCompleteMe/cpp/ycm/../BoostParts', '-isystem', '/System/Library/Frameworks/Python
.framework/Headers', '-isystem', '/Users/cebrusfs/.vim/bundle/YouCompleteMe/cpp/ycm/../llvm/include'
, '-isystem', '/Users/cebrusfs/.vim/bundle/YouCompleteMe/cpp/ycm/../llvm/tools/clang/include', '-I',
'/Users/cebrusfs/.vim/bundle/YouCompleteMe/cpp/ycm/.', '-I', '/Users/cebrusfs/.vim/bundle/YouComple
teMe/cpp/ycm/./ClangCompleter', '-isystem', '/Users/cebrusfs/.vim/bundle/YouCompleteMe/cpp/ycm/./tes
ts/gmock/gtest', '-isystem', '/Users/cebrusfs/.vim/bundle/YouCompleteMe/cpp/ycm/./tests/gmock/gtest/
include', '-isystem', '/Users/cebrusfs/.vim/bundle/YouCompleteMe/cpp/ycm/./tests/gmock', '-isystem',
'/Users/cebrusfs/.vim/bundle/YouCompleteMe/cpp/ycm/./tests/gmock/include', '-I', '/Users/cebrusfs/.
vim/bundle/YouCompleteMe/autoload/../python/clang_includes']
-- Has Clang support compiled in: True
-- clang version 3.2 (tags/RELEASE_32/final)
I set
g:ycm_global_ycm_extra_confin my vimrc.After including a c++11 header
unordered_map, I got'unordered_map' file not foundreported by Syntastic plugin.After adding
in
flagsin.ycm_extra_conf, now my problem is solved.In default
.ycm_extra_conf, the environment didn't include any c++11 headers, but the argument-std=c++11still inflags?I think it's strange. Something should be wrong.
I use the mac os 10.7.5 (Lion) and the following is report by
:YcmDebugInfocommand, hope it helps.