【发布时间】:2011-01-21 21:03:34
【问题描述】:
我目前正在远离我的桌面度假,但是我想练习我的 c++ 尤其是 openCV,所以我带上了我的笔记本电脑。考虑到时间和家庭的限制,我没有在起飞前及时把图书馆的一切都准备好。
我已经设置了关于 VS 2010 的所有内容,就像我记得不久前在我的桌面上所做的那样,但是在 openCV 网站 (http://opencv.willowgarage.com/wiki/VisualC%) 上编译测试示例时2B%2B) 我收到以下错误:
Error 3 error C2244: 'cv::Matx<_Tp,,>::diag' : unable to match function definition to an existing declaration C:\Program Files\OpenCV2.2\include\opencv2\core\operations.hpp 372
Error 4 error C2244: 'cv::Matx<_Tp,,>::diag' : unable to match function definition to an existing declaration C:\Program Files\OpenCV2.2\include\opencv2\core\operations.hpp 448
这反过来告诉我:
template<typename _Tp, int m, int n> inline
Matx<_Tp,m,n> Matx<_Tp,m,n>::diag(const Matx<_Tp,MIN(m,n),1>& d)
{
Matx<_Tp,m,n> M;
for(int i = 0; i < MIN(m,n); i++)
M(i,i) = d[i];
return M;
}
template<typename _Tp, int m, int n> inline
Matx<_Tp, MIN(m,n), 1> Matx<_Tp, m, n>::diag() const
{
diag_type d;
for( int i = 0; i < MIN(m, n); i++ )
d.val[i] = val[i*n + i];
return d;
}
我在 msdn 和 openCV 论坛上查看过这个错误,但我找不到这个特定错误的记录,我不知道如何解决它。
我运行的是 64 位版本的 Windows 7 是否也有问题?我读到 openCV2.2 是兼容的,但是之前在程序编译时,它一直说 .dll 文件丢失,即使 PATH 变量和目录是正确的。
谢谢, 让-皮埃尔
【问题讨论】:
-
没有 64 位版本的 VS2010,将其从列表中划掉以便于解释。再来一杯 piña colada,这可以等到你回来。
-
呸,这让我可以在睡眠时间之外打字。我的意思是windows 7 64bit而不是vs2010。 - 我会编辑那个。由于家庭原因,我在这里一直待到 3 月底,所以要等很久了!
标签: c++ visual-studio-2010 opencv