In my case (Windows 7, x64) this error was caused by my project referencing OpenCV debug dll's on a machine with no msvcp90d.dll. I installed the VS2008 redistributable C runtime, however the debug versions are not installed with the redist.
After the UI error, the event log holds the following:
Activation context generation failed for "
\cv210d.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found.
Option 1: Install VS2008 express to get the debug versions, however it is no longer available for download at MS and VS2010 does not include these files.
Option 2: Change your project references to use the OpenCV release version, e.g. reference cv201.lib instead of cv210d.lib etc..
--- In
[hidden email], "CrisTina" <chrysg23@...> wrote:
>
> Hello!
> I am new to this group and to OpenCV and I am sorry to say that for the beginning I have simply knocked into a great problem: I cannot run my OpenCV 2.0 application in MS Visual Studio 2008, despite the fact that is compiles without errors and the build succeeds.
> The error message I get is: "The application was unable to start correctly (0xc0150002). Click OK to close the application". I also mention that I have tried to solve this problem by installing Microsoft Visual C++ Redistributable Package(both vcredist_x86, as well as vcredist_x86_sp1), but unfortunately to no use. To me it is intriguing the fact that on my other computer it worked just fine, with exactly the same settings. Any idea why this is happening?
> I would kindly appreciate your help, thanks in advance!
>
> Regards,
> Cristina
>