简体   繁体   English

程序无法启动因为缺少opencv_core2410d.dll

[英]The program can't start because opencv_core2410d.dll is missing

I installed visual studio 2012 .i have windows 8.1.then i extract opencv 2.4.10 in c partition. 我安装了visual studio 2012 .i有windows 8.1。然后我在c分区中提取opencv 2.4.10

Created the visual C++ project->win32 Console application. 创建了可视化C ++项目 - > win32控制台应用程序。

As I have x64 machine 因为我有x64机器

 build menu->Configuration manager->platform->x64

then i set below configuration in my vs project. 然后我在我的vs项目中设置下面的配置。

project->properties->configuration->all configuration

VC++Directories->Library Directories->
  C:\opencv\build\x64\vc11\bin,C:\opencv\build\x64\vc11\lib

C/C++->Genaral->Additional Include Derectories->
    C:\opencv\build\include,C:\opencv\build\include\opencv2,C:\opencv\build\include\opencv

change the 改变了

          Configuration->Debug
          Select Linker->Input->Additional Dependencies

    opencv_core2410d.lib
    opencv_highgui2410d.lib
    opencv_imgproc2410d.lib
    opencv_calib3d2410d.lib
    opencv_contrib2410d.lib
    opencv_features2d2410d.lib
    opencv_flann2410d.lib
    opencv_gpu2410d.lib
    opencv_legacy2410d.lib
    opencv_ml2410d.lib
    opencv_nonfree2410d.lib
    opencv_objdetect2410d.lib
    opencv_photo2410d.lib
    opencv_stitching2410d.lib
    opencv_superres2410d.lib
    opencv_ts2410d.lib
    opencv_video2410d.lib

then 然后

   change Configuration->Release
   select Linker->Input->Additional Dependencies

    opencv_core2410.lib
    opencv_highgui2410.lib
    opencv_imgproc2410.lib
    opencv_calib3d2410.lib
    opencv_contrib2410.lib
    opencv_features2d2410.lib
    opencv_flann2410.lib
    opencv_gpu2410.lib
    opencv_legacy2410.lib
    opencv_ml2410.lib
    opencv_nonfree2410.lib
    opencv_objdetect2410.lib
    opencv_photo2410.lib
    opencv_stitching2410.lib
    opencv_superres2410.lib
    opencv_ts2410.lib
    opencv_video2410.lib
    opencv_videostab2410.lib

then i created a class and wrote the code 然后我创建了一个类并编写了代码

    #include "stdafx.h"
    #include "opencv2/highgui/highgui.hpp"
    #include "opencv2/core/core.hpp"

    int main(){
       //declare a new iplimage pointer
       IplImage*myimage;

       //load image
       myimage = cvLoadImage("D:\\visual studio 2012\\katussa.jpg",1);
       cvNamedWindow("Smile",1);
       cvShowImage("Smile",myimage);

       //wait for the key to close the window
       cvWaitKey(0);
       cvDestroyWindow("Smile");
       cvReleaseImage(&myimage);
       return 0;
    }

when i run i got the error message The program can't start because opencv_core2410d.dll is missing . 当我运行时,我收到错误消息该程序无法启动因为缺少opencv_core2410d.dll

You need to add OpenCV to your system path: 您需要将OpenCV添加到系统路径:

You need to add the directory C:\\opencv\\build\\x86\\vc10\\bin to your system PATH. 您需要将目录C:\\ opencv \\ build \\ x86 \\ vc10 \\ bin添加到系统PATH。 This directory contains OpenCV DLLs required for running your code. 此目录包含运行代码所需的OpenCV DLL。

Open Control Panel → System → Advanced system settings → Advanced Tab → Environment variables... 打开控制面板→系统→高级系统设置→高级选项卡→环境变量...

On the System Variables section, select Path (1), Edit (2), and type C:\\opencv\\build\\x86\\vc10\\bin; 在System Variables部分,选择Path(1),Edit(2),然后键入C:\\ opencv \\ build \\ x86 \\ vc10 \\ bin; (3), then click Ok. (3),然后单击“确定”。

ninja edit: 忍者编辑:

make sure you have follow all the steps on this tutorial 确保您已按照本教程中的 所有步骤操作

Sometimes you may get this error even when you have added the relevent bin file, for example \\opencv-xxx\\build\\install\\x64\\vc15\\bin , to the System Path Environment Variable. 有时,即使将相关bin文件(例如\\opencv-xxx\\build\\install\\x64\\vc15\\bin )添加到系统路径环境变量,也可能会出现此错误。

In my case, it worked once I rebooted my PC. 在我的情况下,一旦我重新启动我的电脑,它就起作用了。 Or maybe just restart visual studio and see if it's working, before you reboot the system. 或者在重启系统之前,可能只需重新启动visual studio并查看它是否正常工作。

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

相关问题 使用中提琴opencv_core2410d.dll的打开CV人脸检测丢失 - Open CV face detection using viola opencv_core2410d.dll is missing 运行OpenCv代码时出现系统错误“由于缺少opencv_core244.dll,因此无法启动程序” - System Error When Run OpenCv Code “The program can't start because opencv_core244.dll is missing” 该程序无法启动,因为您的计算机中缺少MSVCP90D.dll - The program can't start because MSVCP90D.dll is missing from your computer 该程序无法启动,因为缺少msvcr100.dll - the program can't start because msvcr100.dll is missing 程序无法启动,因为缺少* .dll - MinGW,Eclipse,Windows 7 - Program can't start because *.dll is missing - MinGW, Eclipse, Windows 7 无法启动程序,因为缺少 Qt5Cored.dll - Can't start a Program because Qt5Cored.dll is missing VS:程序无法启动,因为缺少libfftw3-3.dll - VS: Program can't start because missing libfftw3-3.dll “程序无法启动,因为您的计算机中缺少 opencv_world300.dll”错误 C++ - "The program can't start because opencv_world300.dll is missing from your computer" error in C++ VS2012:程序无法启动,因为缺少“ libvorbisfile.dll” - VS2012: Program can't start because “libvorbisfile.dll” is missing 程序无法启动,因为缺少 libgcc_s_dw2-1.dll - The program can't start because libgcc_s_dw2-1.dll is missing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM