You have two problems here.
The value you give for
g:clang_auto_user_options
is invalid. The "path" that the clang_complete documentation mentions doesn't mean that a path should be written in the option string; it refers to using Vim's built-in'path'
option to provide the list of-I
flags.Use
set g:clang_user_options = "-I/usr/include/c++/4.6"
instead, which just gets passed straight through to clang.Aside: The
getopts#
in the error occurs because clang_complete tries to interpret your-I...
string as a part of the name of an options-source function. (The{anything}
clause in the docs.) The-
ingetopts#-I/usr/include/c++/4.6#getops()
isn't a valid Vimscript function character so it gets truncated there.clang_complete expects the
g:clang_library_path
directory you specify to contain thelibclang.dylib
orlibclang.so
directly inside of it (e.g./usr/lib/clang/libclang.so
in your case).Not all distributions of clang provide the libclang shared library, so you might need to compile it yourself.