Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
893 views
in Technique[技术] by (71.8m points)

opencv - MSVCP100D.dll is missing on your computer debug mode Visual C++ 2012

I know this question was asked before. But I need a real answer, a real explanation! When running (ctrl+F5) the code shown underneath, in Visual Studio 2012 Express, in Release mode, everything works. When running it in Debug mode, I get:

The program cant't start becaue MSVCP100.dll is missin from your computer...

I already installed the Redistributable Package 2010 and 2012.

What is going on??? Please a detailed Explanation, that I can understand :) Thanks a lot!!!

#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 <<" width = "<< image.size().width<<endl;

    //page 27

    return 1;
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Using the compiler options to change the runtime library worked for me ("Configuration Properties"/"C/C++"/"Code Generation". In the item labelled Runtime Library, select Multi Threaded (/MT) for the release version and Multi Threaded Debug (/MTd) for the debug version). I did have to do both the debug and the release to get the release to work. Don't know why.

Note: I was using VC2010 Express version on Windows 7 to compile. I tested on an old XP machine. Another note: MS information at http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=vs.100).aspx


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...