opencv遇到的问题

INK : fatal error LNK1104: 无法打开文件“cv.lib”解决办法.

LINK : fatal error LNK1104: 无法打开文件“cv.lib”.
这条错误已经折腾了我一下午,通过摸索,终于明白怎么解决了.
如果你确定自己在vc++6.0或者VS中配置无误,出现这个问题,说明你的opencv版本高,已经淘汰cv.lib文件了,这时候要想使老工程能够生成代码,就必须安装一个openCV1.0版的包,可以不用这个版,只需要它安装完成的那个cv.lib文件. 安装完后,找到openCVlib可以发现这个文件.
然后以VS2010为例,在这个解决方案右键--属性--连接器--常规--设置附加库---添加这个路径.(PS:VS2010后,我发现这个设置不能针对今后的所有工程,so..每建立一个自己的工程都要重新加一遍.).再重新生成就OK了..
 
 
http://blog.chinaunix.net/uid-11765716-id-3074932.html
http://blog.163.com/chenpeijie0_0/blog/static/1830945712011780275118/
 
 

warning C4627: “#include ”: 在查找预编译头使用时跳过

错误如下:

1>------ 已启动生成: 项目: HashTest, 配置: Debug Win32 ------
1>正在编译...
1>HashTest.cpp
1>c:/documents and settings/nwy2010/my documents/visual studio 2008/projects/hashtest/hashtest/hashtest.cpp(21) : warning C4627: “#include <iostream>”: 在查找预编译头使用时跳过
1>        将指令添加到“stdafx.h”或重新生成预编译头
1>c:/documents and settings/nwy2010/my documents/visual studio 2008/projects/hashtest/hashtest/hashtest.cpp(22) : warning C4627: “#include <fstream>”: 在查找预编译头使用时跳过
1>        将指令添加到“stdafx.h”或重新生成预编译头
1>c:/documents and settings/nwy2010/my documents/visual studio 2008/projects/hashtest/hashtest/hashtest.cpp(24) : warning C4627: “#include "HashAlgo.h"”: 在查找预编译头使用时跳过
1>        将指令添加到“stdafx.h”或重新生成预编译头
1>c:/documents and settings/nwy2010/my documents/visual studio 2008/projects/hashtest/hashtest/hashtest.cpp(87) : fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h"”?

原因:

1、没有添加 #include "stdafx.h" 

2、#include "stdafx.h"  必须添加到.cpp文件的第一行,不能在如:#include <iostream>的后面,必须在前面

3、每个.cpp文件都必须有#include "stdafx.h" 

OpenCV中C++函数imread读取图片的问题

 http://www.cnblogs.com/eyeszjwang/articles/2418354.html

 CV_IMAGE_ELEM 访问图像数据

http://blog.sina.com.cn/s/blog_9e9ce35f01019gyw.html

有朋友提出编译时可能会遇到如下错误:

"fatal error LNK1104: cannot open file 'atlthunk.lib'"

如果遇到此错误,请在文件的开头加入如下语句:

#pragma comment(linker, "/NODEFAULTLIB:atlthunk.lib")

原文地址:https://www.cnblogs.com/hyz5525/p/4444604.html