EmguCV cvextern System.DllNotFoundException

后端 未结 4 1563
余生分开走
余生分开走 2021-01-18 03:40

I am trying to run the example of LicensePlateRecognition in EmguCV 3.1. But I always get the error System.DllNotFoundException and the message is that \"cvextern.dll cannot

相关标签:
4条回答
  • 2021-01-18 04:10

    The error occurred for me because of missing C++ runtime files on the target machine. They can be downloaded and installed from Microsoft.

    0 讨论(0)
  • 2021-01-18 04:12

    I met the same problem as you. I wrote an application based on EmguCV3.1. It works well on my development PC, but once I copied a release version to another PC without installing any development tools, I got the error. And the test PC system environment is Windows 7 64bit.

    Finally, I found that just copy all .dll files from your emgucv install dir such as: D:\Emgu\emgucv-windesktop 3.1.0.2282\bin\x64 or bin/x86 to your release folder. These dll include cvextern.dll, msvcp120.dll, msvcr120.dll, opencvffmpeg310.dll. For 64bit system I copy the dlls from bin\64 folder.

    For your situation, I advise you add the bin\x64 or bin\x86 folder dir to the system path environment.

    Reference:

    EmguCV official wiki about this problem But thers is no necessary to add so much dll for version 3.1.

    And Try to check your configuration of emgucv as wiki said:

    For Version 3.0+, the required vcrt dlls are included in the "x86" and "x64" folder. You will be ready as long as you copy all the unmanaged dlls in the "x86" and "x64" folder to the folder of executable.

    0 讨论(0)
  • 2021-01-18 04:13

    Another issue I encountered (with the same symptom as cvextern not loading) running on Windows Server (in Azure Cloud) was a dependency on Windows Media Foundation. For what it's worth, this is not installed by default on Windows Server 2012. There are a couple remedies:

    1. Add the feature as described in this question about MF support on 2012
    2. Use Server 2016 (Family 5) (where MF is already installed)
    0 讨论(0)
  • 2021-01-18 04:14

    I found this page after encountering a similar problem when upgrading a project from Emgu 3.1.0.2282 to 3.1.0.2504-r16.12

    In my case it was because my Win10 computer did not have Visual C++ Redistributable for Visual Studio 2015 installed.

    More specifically, in Emgu 3.1.0.2282 the "x86" and "x64" folders contained msvcr120.dll and msvcp120.dll, while in 3.1.0.2504 those folders now contain vcruntime140.dll and msvcp140.dll.

    The new dependency isn't mentioned in the changelog or installation instructions, and there was no indication that cvextern.dll was failing because of the visual C runtime - only the error bin\Debug\x64\cvextern.dll failed with error code 126: The specified module could not be found

    I've not needed to copy DLL files around to fix this: my bin directory contains only the Emgu.CV.UI and Emgu.CV.World DLL files, plus the "x86" and "x64" folders (containing 4 DLLs each). I mention this to steer people away from all the advice Google will pull up which was intended for older versions of Emgu.

    0 讨论(0)
提交回复
热议问题