0

Error Unable to locate DLL

I'm integrating different programs based on C++ using OpenCV on Windows Form. I always get the following error when debugging after including OpenCV and importing its libraries :

"Unhandled exception to 0x00007FFC87DFCE60 (ntdll.dll) in OpenCV_faceRecognition.exe : 0xC0000135: Unable to Locate DLL".

I also added OpenCv configurations in project Settings (Linker/C/C++).

Explorer
  • 1,491
  • 4
  • 26
  • 67
  • That's unrelated to Visual Studio. You haven't copied dependencies to the appropriate locations. See [Dynamic-Link Library Search Order](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586.aspx) to understand your issue. – IInspectable Jun 28 '17 at 13:53
  • I already copied dependencies to the appropriate locations. – Rahma Cheikhrouhou Jun 28 '17 at 14:34
  • Why have you tagged this for 2 different versions of Visual Studio? Remember that it is essential to use the correct dlls for the version of Visual Studio that you are using. Using dlls compiled with any other compiler (or a different version of Visual Studio or mixing debug / release) will create UB. – drescherjm Jun 28 '17 at 14:37
  • Hardly convincing, a computer doesn't lie. If the error message indicates, that a program is unable to find a DLL, it does so because it cannot find that DLL (or a dependency of that DLL). Also while you claim, that you have copied the libraries to the appropriate locations, you have made no attempt to explain, where you really put them. [Enable loader snaps](https://stackoverflow.com/a/5818123/1889329) to debug these types of errors. – IInspectable Jun 28 '17 at 14:39
  • At configuration Properties C/C++ -Additional Include Directories-, I already added openCv include folders ( ..\build\include, ..\build\include\opencv and ..\build\include\opencv2). Also at Configuration Properties Linker-Additional Library Directories- I put ..\build\x64\vc14\lib and *.lib at -Additional dependencies- – Rahma Cheikhrouhou Jun 28 '17 at 14:57
  • I have the same problem with VS 2015 and VS 2012 that's why I have tagged 2 different versions of Visual Studio. – Rahma Cheikhrouhou Jun 28 '17 at 15:00

0 Answers0