Ask Your Question

Revision history [back]

I am learning openCV.after I set my Visual Studio,the code can not be Compiled

codes are showing below: C:\fakepath\code.png

my opencv path C:\fakepath\path.png

my VC++ Directrories setting C:\fakepath\setting.png

C:\fakepath\setting2.png

my linker setting C:\fakepath\linkersetting.png

As you can see at first picture that no syntax error show when In coding,but when compiling,there are lots of error C:\fakepath\error.png I suspect that the setting of linker is error,because error happen in compiling. thanks for any help

I am learning openCV.after I set my Visual Studio,the code can not be Compiled

codes are showing below: C:\fakepath\code.pngbelow:

// ConsoleApplication2.cpp: 定义控制台应用程序的入口点。
//
#include <opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include <cstdio>
#include <opencv2/opencv.hpp>
#include "stdafx.h"
using namespace cv;

int main()
{
    printf("I must confess that I feel like a monster");
    Mat img = imread("lena.jpg", CV_LOAD_IMAGE_GRAYSCALE);
    /*imwrite("output.jpg", img);

    namedWindow("Display window", WINDOW_AUTOSIZE);
    imshow("Display window", img);
    waitKey(0);

    return 0;*/
}

my opencv path C:\fakepath\path.png

my VC++ Directrories setting C:\fakepath\setting.png

C:\fakepath\setting2.png

my linker setting C:\fakepath\setting2.png C:\fakepath\linkersetting.png

As you can see at first picture that no syntax error show when In coding,but when compiling,there are lots of error C:\fakepath\error.png I suspect that the setting of linker is error,because error happen in compiling. thanks for any help