Ask Your Question

Building OpenCV with Visual Studio 2012

asked 2012-12-12 06:37:52 -0600

rasharm_msft gravatar image

Is there support for building OpenCV using Visual Studio 2012? I don't really want to use a released version. Happy to pull-down code from latest branches.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2012-12-13 05:11:26 -0600

rics gravatar image

When I tried to build OpenCV 2.4.3 with CUDA support I had problems because nvcc wanted to work with Visual Studio 9 or 10. I have used the latest NVidia CUDA toolkit, version 5.0. Accordingly here NVidia states that Microsoft Visual Studio 2008 or 2010 is a requirement.

After I have downgraded to Visual C++ 2010 Express and I could build OpenCV completely. So if you plan to work with CUDA you may not use the VS 2012 until NVidia updates its CUDA toolkit.

edit flag offensive delete link more


That's correct. Had the same problem with the same solution.

tmanthey gravatar imagetmanthey ( 2012-12-14 04:22:09 -0600 )edit

I am not interested in CUDA at all. Just want to build the sources for ARM to be used inside a Windows 8 Store app.

rasharm_msft gravatar imagerasharm_msft ( 2012-12-15 22:04:52 -0600 )edit

answered 2012-12-12 08:50:40 -0600

Hey, I'm a fellow OpenCV user, and I seem to have no trouble building with Visual Studio 2012. You just have not enough differences between Visual Studio 2010 and 2012 to provide a separate support for VS2012. Anyway, there are a few. Follow the tutorials on VS2010 from here ( and here (, and take note of the fact that you can't save induvidual property pages in VS2012 (as far as I know) as you can in VS2010. That's the one major difference I found and so you have to add libraries directories and stuff to every new OpenCV project you do with VS2012. Happy Coding!

edit flag offensive delete link more


One major difference between 2010 and 2012 is the support for ARM in 2012. I guess that is significant enough to warrant separate support for 2012. Try building the sources for ARM using 2012 and you will see the pain I am talking about :)

rasharm_msft gravatar imagerasharm_msft ( 2012-12-15 22:04:10 -0600 )edit

answered 2013-06-28 14:41:09 -0600

sumit_K gravatar image

Please try the solution given in this instructionCudaApps_With_VS2012.png (This is actually a .7z file; rename it after downloading it).Is there a better way to post these instructions?

edit flag offensive delete link more


".Is there a better way to post these instructions?" get your own cloud storage ? github, dropbox ?

berak gravatar imageberak ( 2013-06-28 14:51:18 -0600 )edit

Question Tools


Asked: 2012-12-12 06:37:52 -0600

Seen: 1,906 times

Last updated: Jun 28 '13