Ask Your Question

Revision history [back]

Compilation failure in VS2010 (Error C2891)

Hey all,

I'm trying to build a simple OpenCV (v2.4.4) program with Visual Studio 2010 and encountering an issue that I've never seen with OpenCV under linux. I suspect it's a MS vs gcc thing, but here's the error I get (keep in mind this worked fine before under linux - only the compiler is different):

C:\Program Files\opencv\build\include\opencv2/core/core.hpp(3142): error C2891: 'fixed_size' : cannot take the address of a template parameter

C:\Program Files\opencv\build\include\opencv2/core/core.hpp(3114) : see declaration of 'fixed_size'

C:\Program Files\opencv\build\include\opencv2/core/core.hpp(3143) : see reference to class template instantiation 'cv::AutoBuffer<_Tp,fixed_size>' being compiled

I'm a stranger in a strange Windows land, so any advice is appreciated. I may try reverting to a 2.3.x version of OpenCV, but I had some dim hope that there was an easy fix and I was just missing something obvious; C++ template programming isn't my favorite thing.

Thanks in advance,

Bill U