Windows 7 64 / Visual Studio 2008 / OpenCV2.1 error: “The application was unable to start correctly (0xhex)..”

给你一囗甜甜゛ 提交于 2019-12-11 02:04:09

问题


I'm building OpenCV2.1 from top of branch in 64 bit mode, when I link the libraries against my code (that works in 32 bit mode on XP), I get the dialog:

"The application was unable to start correctly (0xc0150002) Click OK to close the application"

When I start the application. The event viewer is pointing at one of the OpenCV dll's & says it's a Side-by-Side error, but I'm definitely building OpenCV & my code as a 64 bit compile, and there are no errors during that process. I've tried fiddling with the /MTd options & it doesn't help. Some (almost) related questions have suggested installing the VS2008 redistributable package, but I'm building using vs2008 pro, that seems like madness? Is it still necessary to install the package in my case?

Any help, including the cause of these side-by-side errors, would be appreciated.

James


回答1:


i had the same trouble when i just downloaded OpenCV-2.1.0-win32-vs2008.exe.

all you need is to rebuid OpenCV libs and dlls following instructions here http://opencv.willowgarage.com/wiki/VisualC++_VS2010_CMake.

CMake 2.8.2 is enough BTW.




回答2:


I had the same problem with an application of my own that uses the xerces C++ library. It did not work under Windows Vista/7 64 bits in debug mode but it works perfectly in Release mode.

The solution was to recompile the xerces C++ library in debug mode in my own machine. For some reason, the released binaries for VC++ 10 did not work well in 64 bits Vista/7



来源:https://stackoverflow.com/questions/2690374/windows-7-64-visual-studio-2008-opencv2-1-error-the-application-was-unable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!