您的计算机调试模式Visual C ++ 2012中缺少MSVCP100D.dll

时间:2013-09-23 05:46:13

标签: c++ opencv visual-studio-2012

我知道之前曾问过这个问题。但我需要一个真正的答案,一个真正的解释! 运行(ctrl + F5)下面显示的代码,在Visual Studio 2012 Express中,在发布模式中,一切正常。在调试模式中运行时,我得到:

该程序无法启动,因为MSVCP100.dll错过了您的计算机...

我已经安装了Redistributable Package 2010和2012.

发生什么事了?请详细说明,我能理解:)非常感谢!!!

#include "stdafx.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
    Mat image = imread("Bild.jpg");

    namedWindow("Mein Bild");

    imshow("Mein Bild", image);

    waitKey(5000);

    //The member variable data is in fact a pointer to the allocated memory block that will contain
    //the image data. It is simply set to 0 when no image has been read.
    if(!image.data)
    {
        cout<<"No image has been createt"<<endl;
    }

    cout<<"height = " << image.size().height <<"\t width = "<< image.size().width<<endl;

    //page 27

    return 1;
}

3 个答案:

答案 0 :(得分:2)

按设计。您不能重新分发调试模式可执行文件。顾名思义,它们用于调试,而不是发布。

答案 1 :(得分:1)

使用编译器选项更改为我工作的运行时库(“配置属性”/“C / C ++”/“代码生成”。在标记为运行时库的项目中strong>,为发布版本选择多线程(/ MT),为调试版本选择多线程调试(/ MTd)。我必须同时执行调试和发布以使发布工作。不知道为什么。

注意:我在Windows 7上使用VC2010 Express版本进行编译。我在旧的XP机上测试过。另一个注释:http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=vs.100).aspx

的MS信息

答案 2 :(得分:-1)

我得到了同样的错误,并且尝试了我可以在互联网上找到的所有解决方案,但我终于自己解决了这个问题。

如果您使用的是Windows 7,请尝试重新安装操作系统。由于我使用的是Win 8,我只是refreshed my computer并且再也没有收到错误。一旦你的代码工作,不要忘记create a restore point以防万一:)

请注意,如果您刷新计算机,则必须安装所有程序,但所有个人文件仍然存在。

相关问题