1

I'm using MS Visual studio 2010 and openCV 2.4.8.

I get the following error when I execute some project. enter image description here

Suppose I have a solution which contains only 1 project. That was built by me. And, I have one other solution created by someone else and there are 2 projects in it. Out of the 2 projects created by that person I chose one and I copied the required header files, cpp files, DLLS and everything and put them in my project. Then I get the above error. Both the projects works fine when executed separately. Have I made a mistake in copying ? Or else, is there something else behind this ?

user3704562
  • 67
  • 1
  • 8
  • When you say "copied" - what do you mean? Created a new (fresh) project and copied files into its directories? Or did you copy the other project into your solution's directory? Or did you make references to those other files in your project? Please clarify – YePhIcK Jul 03 '14 at 03:12
  • I created a new fresh project and copied files into its directories – user3704562 Jul 03 '14 at 03:18
  • Did you compare the other project's settings to your new project settings? I bet there's more than one difference there :) – YePhIcK Jul 03 '14 at 03:21
  • http://stackoverflow.com/a/34250958/2224801 – Fadwa Dec 13 '15 at 12:16
  • Did you get it solved? – Joon. P Jan 04 '18 at 01:29

3 Answers3

3

to solve this problem you should copy the DLL files from the direction of opencv like C:\opencv\build\x64\vc12\bin to the debug or release file in the project files

soha samy
  • 57
  • 6
0

The problem is due to 32/64-bit mismatches of various system dlls required by Visual studio. Somehow the dlls it needs got replaced by 64-bit versions that it couldn’t load.

Replacing the dlls mentioned below from a machine that is working, solves the problem:

c:\Windows\SysWOW64\msvcp100.dll
c:\Windows\SysWOW64\msvcp100d.dll
c:\Windows\SysWOW64\msvcr100.dll
c:\Windows\SysWOW64\msvcr100_clr0400.dll
c:\Windows\SysWOW64\msvcr100d.dll

The Application was unable to start correctly (0xc000007b). Click OK to close the application" when starting Visual Studio 2010

Faisal
  • 364
  • 1
  • 8
-1

I've found another solution of this issue. In VS window you can just change the machine type from default 'Win32' to 64-bit (default 'x64').

Rick Smith
  • 9,031
  • 15
  • 81
  • 85