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

Loading libclang failed, completion won't be available. #501

Closed fishcop closed 8 years ago

fishcop commented 8 years ago

Hey guys,

i just installed clang with git clone .... cd clang... make install into my ~/.vim/ and saved the extracted tarball from http://llvm.org/releases/download.html#3.9.0 , the pre-built binary for Arch64 linux(yes i use Arch linux 64bit) in ~/.clang into my .vimrc i put: "let g:clang_library_path='~/.clang/lib' ". But even im 100% sure the "libclang.so" is there, at opening a .cpp file I get the error: "Loading libclang failed, completion won't be available. Are you sure '~/.clang/lib/' contains libclang?"

Do you have any ideas?

xaizek commented 8 years ago

Try changing

let g:clang_library_path='~/.clang/lib'

to

let g:clang_library_path=$HOME.'/.clang/lib' 

Vim or the plugin don't expand ~ in paths.

fishcop commented 8 years ago

Did this, but it has no effect at all.

xaizek commented 8 years ago

It should've at least changed the error message to do not mention path with ~ anymore.

fishcop commented 8 years ago

yes the path in the error is updated to /home/arminusr/.clang/lib

xaizek commented 8 years ago

OK, so the change took effect. You did not download Clang for AArch64 Linux, right?

fishcop commented 8 years ago

This is excatly the package I downloaded

xaizek commented 8 years ago

It's not for Arch Linux x86_64, it's for AArch64, which is 64-bit ARM CPUs. I think you can use this AUR package (it uses OpenSUSE binaries, so you can also just download them instead).

graywolf commented 8 years ago

@fishcop is there any particular reason not to use extra/clang? It works fine for me.

fishcop commented 8 years ago

@xaizek it works now, thank you @graywolf did not know about his existence