windows “应用程序无法启动,因为找不到 cxcore210.dll”。为什么会发生这种情况?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3033416/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"The application has failed to start because cxcore210.dll was not found". Why would this happen?
提问by tomas
I'm having trouble running basic opencv scripts on my new machine. I've installed opencv2.1. I am linking these files from the linker:
我在新机器上运行基本的 opencv 脚本时遇到问题。我已经安装了 opencv2.1。我正在从链接器链接这些文件:
C:\OpenCV2.1\lib\cv210.lib C:\OpenCV2.1\lib\cvaux210.lib C:\OpenCV2.1\lib\cxcore210.lib C:\OpenCV2.1\lib\highgui210.lib
C:\OpenCV2.1\lib\cv210.lib C:\OpenCV2.1\lib\cvaux210.lib C:\OpenCV2.1\lib\cxcore210.lib C:\OpenCV2.1\lib\highgui210.lib
I run the program, it compiles. However, it gives me the error stated above. Why is that? I tried linking to the dll it describes, and it doesn't like that either.
我运行程序,它编译。但是,它给了我上述错误。这是为什么?我尝试链接到它描述的 dll,它也不喜欢那样。
回答by James McNellis
The DLL needs to be somewhere in the DLL search path, otherwise the loader won't be able to find it.
DLL 需要位于DLL 搜索路径中的某个位置,否则加载程序将无法找到它。
The two easiest options are to copy the DLL(s) to the directory in which your executable is located or the directory from which you are running your executable, or to add the directory in which the DLL(s) are located to the PATH.
两个最简单的选择是将 DLL 复制到可执行文件所在的目录或运行可执行文件的目录,或者将 DLL 所在的目录添加到 PATH。
回答by nbsrujan
this video will help you..
这个视频会帮助你..
http://www.youtube.com/watch?v=9nPpa_WiArI
http://www.youtube.com/watch?v=9nPpa_WiArI
Or else I came up with another solution just copy the dll files directly into C:\Windows\SysWOW64 folder (this is my system folder). This helped me and my code was executed.
或者我想出了另一个解决方案,只需将 dll 文件直接复制到 C:\Windows\SysWOW64 文件夹(这是我的系统文件夹)。这对我有帮助,我的代码被执行了。
回答by Mauricio
I had the same problem:
我有同样的问题:
I configure correctly the properties of my project, like 100 tutorials says: But never work, so i try copy the dll to the application directory and works. I dont know why the linker dont see the dlls
我正确配置了我的项目的属性,就像 100 个教程说的:但从来没有工作,所以我尝试将 dll 复制到应用程序目录并工作。我不知道为什么链接器看不到 dll
I just copy the cv210.lib ,cvaux210.lib, cxcore210.lib ,highgui210.lib
我只是复制 cv210.lib ,cvaux210.lib, cxcore210.lib ,highgui210.lib