vscode C++配置opencv

1.下载opencv: opencv-3.4.5-vc14_vc15.exe
https://sourceforge.net/projects/opencvlibrary/files/3.4.5/opencv-3.4.5-vc14_vc15.exe/download
安装提取到相应目录下
在Path中添加系统环境变量
D:\opencv\build
D:\opencv\build\x64\vc14\bin

新建opencv工程,可以看到C++ Intellisense已经安装
在这里插入图片描述
MinGw 配置
Cmake下载.msi安装后打开
先新建MinGW文件夹,然后复制路径如下
在这里插入图片描述
点击 configure 按钮,按照下图所示进行选择
在这里插入图片描述
选择 MinGW 中的 C 和 C++ 编译的exe程序
我的路径: C:\Program Files\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw64\bin
在这里插入图片描述

C:gcc.exe
C++ : g++.exe
报错:The system is: Windows - 10.0.14393 - AMD64
cmake使用的编译器问题,vs2015要选择Visual Studio 14 2015 Win64而不是Visual Studio 15 2017 Win64

猜你喜欢

转载自blog.csdn.net/qq_16792139/article/details/120348967