Skip to content
Rip-Rip edited this page Nov 17, 2010 · 39 revisions

Welcome to the clang_complete wiki!

Clang Installation:

If you want to build clang yourself, see http://clang.llvm.org/get_started.html. Otherwise see below for already built binaries of clang for easier installation.

Debian/Ubuntu

sudo apt-get install clang

MacOSX

sudo port install clang

Windows

On windows building clang is trickier, because when you build it with mingw it's slow as hell and when you build it with msvc it chokes on msvc's headers. The good news is that the --completion-at option still works, so all you have to do is to swallow clang's errors and make vim believe everything went fine. Follow the manual installation and add those lines to your .vimrc:

let g:clang_exec = '"C:\path\to\clang.exe'
let g:clang_user_options = '2> NUL || exit 0"'

Alternatively, you can download a prebuilt msvc 2008 binary to avoid going through the build process. If you use another compiler, or for some reasons you want to make it point to other system headers you can modify g:clang_user_options like this:

let g:clang_user_options = '-IC:\foo\bar "-IC:\path with spaces\keke" 2> NUL || exit 0'
Clone this wiki locally