简体   繁体   English

OpenCV Visual Studio ntdll.dll

[英]OpenCV Visual Studio ntdll.dll

I have trying to create a Project using OpenCV 2.4.10 on Visual Studio 2013, but I have had very little luck so far, owing to the following exceptions. 我试图在Visual Studio 2013上使用OpenCV 2.4.10创建一个项目,但到目前为止我运气很少,原因如下。 Please suggest help. 请提出帮助。 TIA. TIA。

'letstryitonemoretime.exe' (Win32): Loaded 'C:\Users\Kndarp\Documents\Visual Studio 2013\Projects\letstryitonemoretime\Debug\letstryitonemoretime.exe'. Symbols loaded.
'letstryitonemoretime.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded.
'letstryitonemoretime.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded.
'letstryitonemoretime.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded.
First-chance exception at 0x77BC8F05 (ntdll.dll) in letstryitonemoretime.exe: 0xC000007B:  %hs is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0x.
Unhandled exception at 0x77BC8F05 (ntdll.dll) in letstryitonemoretime.exe: 0xC000007B:  %hs is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0x.

I got the same error message because my program was trying to load a 32-bit DLL instead of the 64-bit DLL. 我得到了相同的错误消息,因为我的程序试图加载32位DLL而不是64位DLL。 You can see which DLLs your program is trying to load using Dependency Walker . 您可以使用Dependency Walker查看程序尝试加载哪些DLL。

Do the following steps: 执行以下步骤:

  1. Open Dependency Walker 打开Dependency Walker
  2. Open your executable (File->Open select your executable) 打开可执行文件(文件 - >打开选择你的可执行文件)
  3. Make sure all your DLLs use the same CPU architecture. 确保所有DLL都使用相同的CPU架构。 The middle pane lists all the DLL your program is using. 中间窗格列出了程序正在使用的所有DLL。 The CPU column says if the DLL is 32-bit or 64-bit. CPU列表示DLL是32位还是64位。 They should all be the same. 它们都应该是一样的。

In my case one of the DLLS was 32-bit instead of 64-bit because I had not added the 64-bit DLL to my environment path. 在我的情况下,其中一个DLLS是32位而不是64位,因为我没有将64位DLL添加到我的环境路径。 I just copied the 64-bit DLL into the same folder as my program binary and the error went away. 我刚刚将64位DLL复制到与程序二进制文件相同的文件夹中,错误就消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM