Ask Your Question
0

OpenCV 2.4.2 in Visual Studio 2012/VC11?

asked 2012-09-01 23:13:29 -0600

Joshua Burkholder gravatar image

updated 2012-09-04 10:23:54 -0600

Andrey Pavlenko gravatar image

How do I successfully compile OpenCV 2.4.2 in Visual Studio 2012/VC11?

I just downloaded & installed Visual Studio 2012 (VS2012) and I'm attempting to compile OpenCV 2.4.2. I'm getting 2492 errors. Most of these errors seem to be generated from std::tuple (a.k.a. ::std::tr1::tuple). I believe that VS2012/VC11 doesn't implement variadic templates from the C++ 2011 Standard yet, so the Standard Library used by this initial version of VS2012/VC11 has to imitate variadic templates in its definition of std::tuple (i.e. defining std::tuple for what it thinks is a reasonable number of typenames) ... and it appears that the number of typenames used doesn't quite meet the expectations of the std::tuple used in OpenCV 2.4.2.

Before I go fiddling with a bunch of settings in VS2012/VC11 or using a different Standard Library/std::tuple (maybe Boost's?), I just wanted to check to see if anyone already had an easy fix ... or some lessons learned.

... and yes ... I already use OpenCV with VS2010/VC10 (on Windows) and g++ 4.7 (on both Windows and Linux), so I'm focusing on trying to get OpenCV to work with VS2012/VC11.

Thanks In Advance, Joshua Burkholder

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-09-02 04:40:42 -0600

I think this has been fixed, see:

So if you compile the latest revision from the git repository, it should work I think.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-09-01 23:13:29 -0600

Seen: 6,740 times

Last updated: Sep 02 '12