Skip to content

Installation on Windows MinGW

MohammadElmi edited this page Sep 29, 2011 · 3 revisions

There are a bunch of bug reports/questions on the web mentioning compile issues with clang/STL/MinGW.

Basically I used this tutorial to install clang_complete. Because it is for OSX, here is this windows tutorial:

  1. Download and install MinGW. There is also an all-in-one installer here and a complete guide here.

  2. Get clang working! Although you can compile it on Windows, I recommend to download a pre-compiled version from here. After download, unzip the file and put resulting directory wherever you want.

  3. Install clang_complete! The process is just like installing any other vim plugin.

  4. Now, although you installed whatever you need, nothing works! Firstly, you should tell clang_complete where it can find clang exec by setting let g:clang_exec='c:\clang address\clang.exe' option in your vimrc.

  5. Clang should work, but not for STL. Unfortunately clang has a static assumption on where MinGW is installed on windows as mentioned in its user manual:

Clang works on some mingw32 distributions. Clang assumes directories as below;

C:/mingw/include

C:/mingw/lib

C:/mingw/lib/gcc/mingw32/4.[3-5].0/include/c++

So, we should change our directory names of MinGW installation (or create a new copy of them with names that clang expects). I did not test it by myself, but I think adding these directories to path also should work.

Good luck :)

Clone this wiki locally