xavierd / clang_complete

Vim plugin that use clang for completing C/C++ code.
http://www.vim.org/scripts/script.php?script_id=3302
1.96k stars 308 forks source link

which version for python and clang #586

Open lougxing opened 3 years ago

lougxing commented 3 years ago

MY system is centos6.2 My vim version is 8.2(+python3/dyn +python/dyn) libclang.so is 3.4 python is 2.6.6 python3 is 3.4.5

bash-4.1$ cat .vimrc let g:clang_library_path='/usr/lib64/llvm/libclang.so' let g:clang_complete_copen=1 let g:clang_periodic_quickfix=1 let g:clang_snippets=1 let g:clang_close_preview=1 bash-4.1$ ll /usr/lib64/llvm/libclang.so -rwxr-xr-x 1 root root 14477112 Jan 3 2015 /usr/lib64/llvm/libclang.so

The error message "Option completefunc is not set"

xaizek commented 3 years ago

Try with

let g:clang_library_path='/usr/lib64/llvm/'

This option specifies directory.

lougxing commented 3 years ago

It still didn't work.

bash-4.1$ cat .vimrc let g:clang_library_path='/usr/lib64/llvm/' let g:clang_complete_copen=1 let g:clang_periodic_quickfix=1 let g:clang_snippets=1 let g:clang_close_preview=1

bash-4.1$ rpm -qf /usr/lib64/llvm/libclang.so clang-3.4.2-4.el6.x86_64

bash-4.1$ cat .clang_complete -I/usr/include/c++/4.4.4/

bash-4.1$ cat a.cc

include

include

int main() { std::vector mm;

}

bash-4.1$ ll /usr/include/c++/4.4.4/vector -rw-r--r-- 1 root root 2698 Jun 19 2018 /usr/include/c++/4.4.4/vector

xaizek commented 3 years ago

Right, looks like clang_library_path can point to a directory as well. I forgot about it.