How to Build OpenCV 3.1 with MSVC2010 for x86

Posted on Posted in OpenCV Tutorials, Tutorials

OpenCV 3.1 was released yesterday and with a first look I noticed that prebuilt libraries for x86 VC10 (MSVC2010) are nowhere to be found in the installation folder. In fact there is no x86 folder to begin with. Some of my recent apps all are built using MSVC2010 so I had to build OpenCV myself. Here is what I did and what I suggest you should do.

Previously I wrote a guide about building OpenCV 2.4.11 with VC14. In fact building OpenCV 3.1 with VC10 is quite similar if not the same. Please read this guide first and then check out the differences below:

The only obvious and very simple differences are :

  • You need to install Microsoft Visual C++ 2010 (Express)
  • You have to select MSVC 2010 (VC10) compiler while running CMake configure.

I built OpenCV 3.1 successfully myself but if you are still unable to build using this guide then just put a comment bellow to start a conversation about it.

Good luck!

14 thoughts on “How to Build OpenCV 3.1 with MSVC2010 for x86

  1. Hi, in the x64 lib folder there is only one .lib file for release and one for debug.

    After building for x86, I have multiple .libs for both release and debug (similar to previous 2.4.12 version).

    Is this normal ?


    1. Unfortunately not. And I highly recommend against using someone else’s build. I would gladly help you build one exactly like mine for yourself 🙂

  2. hi
    i want build OpenCV 3.1 with MSVC2012 FOR x64
    but in cmake when i click on configure, i get this error “error in configuration process project files may be invalid”

    how can fixed this?

  3. I’m trying to install OpenCV 3.1.0 with MSVC2012 compiler using CMake. I get an error saying that the file hash is different from the expected hash.
    Download: Local copy of opencv_ffmpeg.dll has invalid MD5 hash: d41d8cd98f00b204e9800998ecf8427e (expected: 89c783eee1c47bfc733f08334ec2e31c)

    how to fix this?

    1. Check your network connection and reconfigure again. invalid MD5 hash value means you don’t have the correct files or they are corrupted. (can happen due to a faulty connection.)

  4. I am having big trouble with it. I have successfully built it and i have the OpenCV.sln file. I am able to open the solution in ***VS15*** but I cant build it there. I get LNK1112 error. what should I do?

    I don’t even have that opencv\build\x86 folder to use in CMake, I only have x64 one. I downloaded opencv from > OpenCV for Windows (3.1).
    What should I do?

    1. forget thesecond part of my comment. how do I solve the first part?

      Severity Code Description Project File Line Suppression State
      Error LNK1112 module machine type ‘x64’ conflicts with target machine type ‘X86’ opencv_python2 D:\tools\opencv-build\modules\python2\python27.lib(python27.dll) 1

      1. Can you tell me which version of Visual Studio you are using for building? Is it x86 or x64?

        It seems you are creating project for one version and then try to build it with another version of VS.

Leave a Reply

Your email address will not be published. Required fields are marked *