vs2013+opencv2.4.13错误集合

来源:互联网 发布:软件专业毕业论文题目 编辑:程序博客网 时间:2024/06/14 10:27

1、snprintf不是windows的函数。这里修改为_snprintf;

2、 fatal error C1083: 无法打开包括文件: “sys/time.h”: No such file or directory;
改为:#include<”time.h”

3、 error C3861: “gettimeofday”: 找不到标识符;
gettimeofday是Linux上的函数

4、error LNK2005: main 已经在 Demo.obj 中定义;
工程中存在多个main函数,注释掉或删除都可以。

5、error while decoding MB 14,bytestream(-14)

从播放界面上看,播放会画面跳帧,并且一顿一顿的。
CvVideoWriter *writer = cvCreateVideoWriter(out_video_name,
CV_FOURCC(‘x’,’V’,’I’,’D’),
fps,
cvSize(frameW, frameH),
1);
6、1>d:\learning\dip\opencv2413\opencv\build\include\opencv2\flann\logger.h(66): error C4996: ‘fopen’: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

属性——>C/C++——>预处理器——>编辑加入_CRT_SECURE_NO_WARNINGS

原创粉丝点击