Now prebuilt Clang snapshots are available on the LLVM snapshot builds site. you don't need to compile it yourself, get latest Windows snapshot build from that page.
- Install all requirements from the instructions above. Dont compile anything yet. (visual studio 2012 sdk, cmake)
- Create a build directory and
cd
into it. (using MS Visual studio developer command prompt) - Suppose you are've successfully installed Clang from installer in a
C:\LLVM
dir. Now, runcmake -G "Visual Studio 11" -DPATH_TO_LLVM_ROOT=C:\LLVM . <USERFOLDER>\vimfiles\bundle\YouCompleteMe\third_party\ycmd\cpp
. Dont forget to change a VS version and a path to Clang build dir if you are using different VS version or build path. - Open the solution in visual studio and build the whold solution. If you are getting errors like:
'boost::bind' : ambiguous call to overloaded function
. This issue was fixed, try updating to the latest version of YCM.unresolved external symbol __imp__clang_createIndex
- that means that linker cant find Clang libraries. Check your path specified inConfiguration Properties -> Linker -> Input -> Additional Dependencies
field.
- files should already be in the correct place. if not, do this: copy
ycm_core.pyd
fromycm\Release
andlibclang.dll
fromC:\build\bin\Release
to<USERFOLDER>\vimfiles\bundle\YouCompleteme\python
.
If encounter error about C runtime when running VIM, remove cmake path from system PATH. (because there are multiple msvcr90.dll, one is from cmake path, the other is winsxs, which is the one should be used.
On how to figure our run time error: http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application
build instruciton page: https://github.com/Valloric/YouCompleteMe/wiki/Windows-Installation-Guide
After everything finished. add following to vimrc so it won't complain about extra conf file, and also works nice with UltiSnips:
let g:ycm_global_ycm_extra_conf = '[userdir]/vimfiles/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_confirm_extra_conf = 0
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']