As the title suggests, when using vim-clang, it displays fatal error: 'iostream' file not found, which is not complementary.
It's my environment.
ubuntu 14.04.5 LTS
VIM-Vi IMproved 8.0
I also use neocomplete.
/usr/bin/ has clang as follows:
clang++-3.8clang-format-diff-3.4
clang-3.8 clang-format-diff-3.6
clang-apply-replacements-3.8 clang-query-3.8
clang-check-3.8 clang-rename-3.8
clang-cl-3.8 clear
clang-format-3.4 clear_console
clang-format-3.6
We also use dein.vim for plug-in management.
The vim-clang configuration is described as follows:
(I used the code on the page below.)
http://qiita.com/koara-local/items/815b08ff5c6673d8a5c6
[plugins]]
repo='justmao945/vim-clang'
hook_add='"
" disable auto completion for vim-clang
letg —clang_auto=0
letg —clang_complete_auto=0
letg —clang_auto_select = 0
letg —clang_use_library=1
" default 'longest' can not work with neocomplete
letg:clang_c_completeopt='menuone'
letg:clang_cpp_completeopt='menuone'
" get clang path
function!s: get_latest_clang(search_path)
letl: filelist=split(globpath(a:search_path, 'clang-*', '\n')
letl:clang_exec_list=[]
for l:file in l:filelist
ifl: file=~'^.*clang-\d\.\d$'
call add (l:clang_exec_list, l:file)
endif
endfor
iflen(l:clang_exec_list)
return reverse(l:clang_exec_list)[0]
else
return 'clang'
endif
endfunction
" get clang-format path
function!s: get_latest_clang_format(search_path)
letl: filelist=split(globpath(a:search_path, 'clang-format-*',
US>'\n')
letl:clang_exec_list=[]
for l:file in l:filelist
ifl: file=~'^.*clang-format-\d\.\d$'
call add (l:clang_exec_list, l:file)
endif
endfor
iflen(l:clang_exec_list)
return reverse(l:clang_exec_list)[0]
else
return 'clang-format'
endif
endfunction
letg:clang_exec=s:get_latest_clang('/usr/bin')
letg:clang_format_exec=s:get_latest_clang_format('/usr/bin')
" print debug
echo —clang_exec
echo —clang_format_exec
" compile options
letg:clang_c_options='-std=c11'
letg: clang_cpp_options='-std=c++11-stdlib=libc++'
'''
on_ft = ['c', 'cpp' ]
on_i = 1
Could someone tell me about this problem?
c++ vim
letg:clang_cpp_options='-std=c++11-stdlib=libc++'
letg:clang_cpp_options='-std=c++11'
I think you can change it to .
© 2024 OneMinuteCode. All rights reserved.