文章来源地址https://www.toymoban.com/news/detail-531173.html
txt文档:-std=c++11 -static-libgcc -lopencv_calib3d2410.dll -lopencv_calib3d2410d.dll -lopencv_contrib2410.dll -lopencv_contrib2410d.dll -lopencv_core2410.dll -lopencv_core2410d.dll -lopencv_features2d2410.dll -lopencv_features2d2410d.dll -lopencv_flann2410.dll -lopencv_flann2410d.dll -lopencv_gpu2410.dll -lopencv_gpu2410d.dll -lopencv_highgui2410.dll -lopencv_highgui2410d.dll -lopencv_imgproc2410.dll -lopencv_imgproc2410d.dll -lopencv_legacy2410.dll -lopencv_legacy2410d.dll -lopencv_ml2410.dll -lopencv_ml2410d.dll -lopencv_nonfree2410.dll -lopencv_nonfree2410d.dll -lopencv_objdetect2410.dll -lopencv_objdetect2410d.dll -lopencv_ocl2410.dll -lopencv_ocl2410d.dll -lopencv_photo2410.dll -lopencv_photo2410d.dll -lopencv_stitching2410.dll -lopencv_stitching2410d.dll -lopencv_superres2410.dll -lopencv_superres2410d.dll -lopencv_ts2410 -lopencv_ts2410d -lopencv_video2410.dll -lopencv_video2410d.dll -lopencv_videostab2410.dll -lopencv_videostab2410d.dll
选择“目录”选项分别设置“二进制”、“库”、“c包含文件”、“c++包含文件”
配置“二进制”选项
(1)选择“二进制”标签
(2)选择“浏览”按钮,打开openc'v所在得文件
(3)选择opencv中bin文件,点击确定
(4)选择添加
注:以下其余操作如同“二进制”操作一样
配置“C包含文件”选项卡
配置“C++包含文件”选项卡
第五步:测试
运行如下程序:
#include<iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main()
{
// 创建一个名为 "游戏原画"窗口
namedWindow("这是第一个测试窗口");
// 等待6000 ms后窗口自动关闭
waitKey(6000);
}
文章来源:https://www.toymoban.com/news/detail-531173.html
到了这里,关于在DevC++中配置Opencv的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!