首页 > 解决方案 > 当我将鼠标移到 Mat 关键字上时,Visual Studio 2017 冻结(OpenCv 3.4.1)

问题描述

我想在 Visual Studio 2017 中开发 openCv 项目。我下载了 opencv 预构建库并进行了必要的设置。那是:

1)我添加了系统路径...build\x64\vc14\bin

2) 在 Visual Studio 中的项目属性中,我...opencv\build\include在 C/C++ -> General Settings 下添加了 Additional Include Directories

...opencv\build\x64\vc14\lib3) 我在 Linker->General Settings 下添加了 Additional Include Directories

opencv_world341d.lib4) 我在 -> Linker->Input Settings 下添加了 Additional Dependecies

我写了下面的代码,它编译没有错误

 // opencv.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#include <opencv2/opencv.hpp>
using namespace cv;

int main() {
    Mat img;
    return 0;
}

但问题是当我在 2-3 秒后将光标移到 Mat 关键字上时 VS 冻结并且无论如何都不响应。你知道为什么会这样吗?

标签: c++opencv

解决方案


似乎问题与VS2017有关,我在VS2015上尝试过并没有收到这样的错误。


推荐阅读