Ask Your Question

Cannot Do Anything With OpenCV Anymore on Windows 7 64-bit

asked 2012-11-10 08:47:38 -0500

manmedia gravatar image manmedia
83 2 8

updated 2012-11-20 09:26:59 -0500

SR gravatar image SR
1197 12 22


I have tried to work with OpenCV 2.2, 2.3, 2.4.0, 2.4.2 and none of them gave my any luck at all. I have Windows 7 64-bit installed in my i5 machine with L3 cache, 8 GB RAM, and 500 GB Hard Drive. I do this to integrate OpenCV:

1) Download the stable version from

2) Download CMake 2.8

3) Add C:\OpenCV\build\x86\vc10\bin folder to SYSTEM PATH.

4) Make OpenCV files in a folder called "vs2010build" in OpenCV installation folder.

5) Open the opencv solution in "vs2010build" folder and then build all the libraries again.

When I am at step 5. My windows become really and phenomenally slow like the a browser window, file explorer window, or even the simply volume control menu in the task bar takes nearly a minute to pop-up. Ironically, it is only with OpenCV and no other Visual C++ Express 2010 solution or project will cause this mess! The problem was the same when I tried to install with Code::Blocks IDE and MingGW compiler.

I have been trying to draw attention to people of OpenCV community to actually investigate whether or not they have the same problem and if no, how do you go about doing it. People simply point me towards the OpenCV's own website but I am finding it really misleading. I want a solution to this problem by people who actually did it themselves rather than blinding pointing me towards OpenCV's installation guideline (outdated anyway). Most importantly, some of the important documentations and guidelines are not even quality controlled i.e. no feedbacks or productive comments that it actually does or doesn't work!

I have been following posts from <>, <>, <>, and other possible Google Search Results but no one is addressing this issue. This is really serious for me I cannot work because of this problem now! I would really appreciate if someone can verify what I am talking about. Most importantly, I would be grateful if someone has pretty much the same setup of Visual Studio/Visual C++ Express 2010, OpenCV, and Windows 7 64-bit as mine, but DO NOT HAVE THIS PROBLEM!!! PLEASE I NEED HELP!!!

N.B. I believe pointing to x86 library files is correct because my Visual C++ Express 2010 ACTUALLY gets registered in the process list as a 32-bit application running on Windows 7 64-bit. However, I changed it also to x64 library files but SAME RESULT!!! JUST SO YOU KNOW THAT WE ALL ARE GOOD PEOPLE TRYING TO SORT OUT ERRORS/FAILURES/BUGS by considering any/every possible combination of solutions.

Just to tell you what I am on about, If you have OpenCV and Windows 7 64-bit, take my source code (below) and use it to build a simple project and see if your PC is dying slowly.

 #include <opencv2/core/core.hpp>
 #include <opencv2/highgui/highgui.hpp>

 using std::cout;
 using std::endl;

 int main(const char agc, const char* argv[]) {

cv::Mat inputImg = cv::imread("../Android-x86.png",0);
return 0;

If you have the same issue, we can definitely conclude that OpenCV's libraries are not stable for running on Windows 7 64-bit OS.

delete close flag offensive retag edit



We have the same problem on installation on the new OpenCV but I'm using Eclipse. I think OpenCV must create a new guide for OpenCV installation. I also have problems building the libraries. My sympathy.

Karl ( 2012-11-10 10:32:05 -0500 )edit

Karl...thanks a lot for confirming that...I have also tried itvwith Dev C++, code::blocks, eclipse, and visual studio...nothing...are your symptoms same as mine?

manmedia ( 2012-11-10 10:43:11 -0500 )edit

Yes i have the same Issue, but I have managed to fix some basic functionality like image loading but image comparison just didn;t want to compile SURF or FANN neither.

Szippy ( 2012-11-10 10:49:31 -0500 )edit

@Szippy I have wasted 10 weekends tried to fix this but still not anywhere!!!! I have to ask a colleague in the office whom I saw yesterday doing some hankey pankey with OpenCV and (possibly) with Windows 7 64-bit. If he has managed to fix it, which will be great, I would be posting updates on Monday, 1st or 2nd thing :P...But once again, +1 for your contribution Szippy and I am pleased that you have confirmed this issue in a way I expected. Ta

Btw...Any chance EmguCV (although it is a wrapper to Windows-based development) can make our lives better? or is it even worse?

manmedia ( 2012-11-10 10:55:32 -0500 )edit

Did you actually check if you can create 64-bit programs with Visual Studio Express? I doubt that but I am not sure.

SR ( 2012-11-11 13:49:39 -0500 )edit

@SR I am pretty sure about 32-bit stuff...which is my only concern for the time being...personally I couldn't care less about the 64-bit support in visual C++ express 2010...more b importantly as I did before...even if you had the full version OpenCV just doesn't work with anything on Windows 7 64-bit......aaaaaargh...

manmedia ( 2012-11-11 14:06:52 -0500 )edit

@manmedia. That is not true for me. I used OpenCV 2.1, 2.2, 2.3 with Visual Studio 2008 SP1 on Windows 7 in 64-bit mode extensively and I never experienced such problems.

SR ( 2012-11-11 14:46:12 -0500 )edit

@SR so what is it that you think you have and I don't have? This is my original question. And I am glad to know that you have a working version of OpenCV without any problem on Windows 7 64-bit. Could you please tell me how you got about setting up your OpenCV? What exactly did you do with them? This is what I really want to know that if I am missing something, I need to UNMISS it so that I can do the same as you.....It involves any Windows Update too. I just want to fix this problem because it only creates problems when I start using OpenCV

manmedia ( 2012-11-11 14:50:09 -0500 )edit

I did not do anything special. I used both pre-compiled and self-compiled versions with success. See also my answer below.

SR ( 2012-11-11 15:03:54 -0500 )edit

7 Answers

Sort by ยป oldest newest most voted

answered 2012-11-11 15:02:13 -0500

SR gravatar image SR
1197 12 22

updated 2012-11-11 15:09:38 -0500

  1. Unfortunately you do not provide a specific error message or describe a specific behaviour. The description is rather unclear as you keep complaining about the effect. Are there any reproducable steps to get "that effect"?
  2. It does not matter which kind of process (32-bit, 64-bit) Visual Studio or Windows is. It only matters whether you compile your program with the x86 or the x64 toolchain. You must link against the corresponding OpenCV DLLs.
  3. Double-check that you only link against debug DLLs in debug mode and you only link against release DLLs in release mode.
  4. Your step 3: "Add C:\OpenCV\build\x86\vc10\bin folder to SYSTEM PATH." sounds dangerous to me. Not by itself (that's fairly standard) but only because of the described behaviour. You might override some important DLLs with those within that folder. Omit that step. Compile OpenCV with your desired architecture and copy the resulting OpenCV Dlls in that folder where your program's exe is.
  5. If the problem persists: Copy your Project, the entire solution, the code and the OpenCV DLLs to another machine. Check (recompile if necessary) if the problem is present there too. If not, you might want to get a fresh reinstall of your OS.
link delete flag offensive edit


@SR Last night I was bored and did "Brute Force" attack on my own machine....and yes, even the Windows Update install/search is slowing down my machine like this!!! I realised that after SP1 installation Windows 7 64-bit troubled a millions of PCs. I tried to download Microsoft's Hotfix but it complains that "Please insert the last disk which is the part of this compressed package"??? What on earth? And then I went to Lenovo's service centre online (My model is V470 Ideapad) to download hotfix from them. And it still doesn't do any good after installation. I know this is OT for here now, so I am happy to conclude that My Windows got CORRUPTED SOMEHOW!!! I raised an issue both in MS Support site and suggestions..Thnx for your help..really can't ask for more!! :)

manmedia ( 2012-11-12 03:03:08 -0500 )edit

answered 2012-11-11 09:17:36 -0500

Hodali gravatar image Hodali
63 7

updated 2012-11-11 12:19:14 -0500

Try Visual Studio 2012 Express! It is avaiable on for free. Debugging is also possible. I found out that one have to copy some DLLs from Visual Studio 10 or Visual Studio 2010 Express.

link delete flag offensive edit

answered 2013-01-04 07:33:32 -0500

Avi gravatar image Avi

This Can be helpful to install in windows with Visual Studio.

link delete flag offensive edit
link delete flag offensive edit


@Hodali I apologise, but I think I have REPEATEDLY said IN MY ORIGINAL QUESTION that all those things that you are posting are bit "useless" for me as I HAVE TRIED all of them almost 10 times with based on different IDEs. I want a solution that is by someone who manually installed and found a problem. If you haven't had any problem, you wouldn't understand what I am trying to get across to other user here. Please see @Karl's and @Szippy's comments after the original question. Thanks for your effort, but please read my original question before you suggest anything that I have been trying since last month!

manmedia ( 2012-11-11 04:12:49 -0500 )edit

answered 2012-11-10 12:08:33 -0500

Hodali gravatar image Hodali
63 7

updated 2012-11-10 20:18:12 -0500

I have Visual Studio 2012 installed on Windows 7 64-bit and it works well except debugging. I installed OpenCV in the root directory C:.

I added C:\opencv\build\x86\vc10\bin to the system variable Path. To each project you have to create a PropertySheet. The include directory are C:\opencv\build\include and c:\opencv\include. The library directory is C:\opencv\build\x86\vc10\lib. Add the following libs to the Linker (Debug):

opencv_calib3d243d.lib opencv_contrib243d.lib opencv_core243d.lib opencv_features2d243d.lib opencv_flann243d.lib opencv_gpu243d.lib opencv_haartraining_engined.lib opencv_highgui243d.lib opencv_imgproc243d.lib opencv_legacy243d.lib opencv_ml243d.lib opencv_nonfree243d.lib opencv_objdetect243d.lib opencv_photo243d.lib opencv_stitching243d.lib opencv_ts243d.lib opencv_video243d.lib opencv_videostab243d.lib

For the Release (Linker) the same except the follwing libs have to be added:

opencv_calib3d243.lib opencv_contrib243.lib opencv_core243.lib opencv_features2d243.lib opencv_flann243.lib opencv_gpu243.lib opencv_haartraining_engine.lib opencv_highgui243.lib opencv_imgproc243.lib opencv_legacy243.lib opencv_ml243.lib opencv_nonfree243.lib opencv_objdetect243.lib opencv_photo243.lib opencv_stitching243.lib opencv_ts243.lib opencv_video243.lib opencv_videostab243.lib

That all! You can compile and run the applications. But I cannot debug because the following message is always appeared:

The program can't start because MSVCP100D.DLL is missing from your computer. Try reinstalling the program to fix this problem

I couldn't find MSVCP100D.DLL on my system and the internet. Does anyone knows this problem?

link delete flag offensive edit


Thanks for that I will try it out! I am using Visual C++ 2010 Express so it should be fine. But we have tried with different IDEs and compilers and OpenCV has got a problem, not our PC or IDEs. Nevertheless, I will try your fix.

Hey you can check what target it is for your project i.e. is it a JUST console application or Windows Console application. And also, did you generate precompiled header and then deleted it? I remember it has something to do with they way you configure your projects. I am pretty certain that I had this but I fixed it by playing with the property sheet. Apologies I cannot remember anymore :( Please look forward to further comments as I have to include C:\opencv\include as well. Last time I didn't add it. However, My problem was with 2010 and you are using 2012.

manmedia ( 2012-11-10 12:27:40 -0500 )edit

@Hodali Nada!! Your solution seems to be working in Visual Studio 2012 but not Visual Studio 2010. I cannot get it to work with Windows 7 64-bit after following what you told me. It is slowing down my machine just like everything else. The last hope is that I can use the event logger to check what is going on as soon as I call the OpenCV stuff from Visual Studio.

manmedia ( 2012-11-10 18:22:32 -0500 )edit

MSVCP100D.DLL is a debug DLL of the Visual C++ 10.0 (VS2010) Runtime. While you can download and install the redistributable (i.e. the release DLLs) for any Visual C++ version, AFAIK the debug DLLs are only shipped with the respective Visual Studio version. Apparently you can run the program because you have the respective runtime dlls installed. But you cannot even run the debug version of your program because the debug DLLs you have are these of Visual Studio 2012.

SR ( 2012-11-11 13:37:27 -0500 )edit

I solved that problem by copying the DLLs from Visual Studio 2010 Express to the working directory. Actually the OpenCV team should provide libraries which work with Visual Studio 2012. By the way I rebuilt the binary from scratch in Visual Studio 2012. But it it hasn't helped (same problem).

Hodali ( 2012-11-11 14:04:57 -0500 )edit

@Hodali I apolgise for not seeing you guys solving the MSVCP100D.dll issue...copying the .dll to the working (debug/release) is always A FIX....However, has anyone except @Hodali has solved the crucial isse of OpenCV and Windows 7 64-bit?

manmedia ( 2012-11-11 14:24:30 -0500 )edit

answered 2013-01-04 07:31:05 -0500

Avi gravatar image Avi

This Can be helpful for installation in windows with visual studio.

link delete flag offensive edit

answered 2012-11-12 17:31:50 -0500

manmedia gravatar image manmedia
83 2 8

My Windows 7 64-bit was totally messed up due to some updates/virus/something that was not supposed to be there! Funny enough that I had Kaspersky Anti-Virus and usually Anti-Virus is the one that causes all these trouble, but it didn't. Restored the original build image of my laptop and now it is running okay.

Tnanks to all for contributing! I take my word back that OpenCV doesn't have any problem on Windows 7 64-bt.

link delete flag offensive edit


Congratulations. Good for you. :)

Karl ( 2012-11-13 01:43:50 -0500 )edit

Login/Signup to Answer

Question tools


subscribe to rss feed


Asked: 2012-11-10 08:47:38 -0500

Seen: 3,993 times

Last updated: Jan 04 '13