OpenCV问题

jsjliuxing 2011-05-31 10:38:39
在VC6.0中配置OpenCV2.2
编译一个程序时,遇到如下错误:不知是什么原因??
--------------------Configuration: OpenCV - Win32 Debug--------------------
Compiling...
OpenCV.cpp
c:\opencv2.2\include\opencv2\core\core.hpp(361) : error C2535: '__thiscall cv::Allocator<U>::cv::Allocator<U>(const class cv::Allocator<U> &)' : member function already defined or declared
c:\opencv2.2\include\opencv2\core\core.hpp(359) : see declaration of 'Allocator<_Tp>::Allocator<_Tp>'
c:\opencv2.2\include\opencv2\core\core.hpp(377) : see reference to class template instantiation 'cv::Allocator<_Tp>' being compiled
c:\opencv2.2\include\opencv2\core\core.hpp(400) : error C2989: 'DataDepth<class ?? ::_Tp *>' : template class has already been defined as a non-template class
c:\opencv2.2\include\opencv2\core\core.hpp(400) : error C2988: unrecognizable template declaration/definition
c:\opencv2.2\include\opencv2\core\core.hpp(499) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Command line warning D4028 : minimal rebuild failure, reverting to normal build
Error executing cl.exe.

OpenCV.exe - 4 error(s), 1 warning(s)
...全文
215 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
碎碎念 2011-05-31
  • 打赏
  • 举报
回复
是版本的问题吧,vc6中用的OpenCV1.1版本,vc2008用的是2.1,vc6.0不能用2.2版本吧。。。

64,678

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧