How to rebuild openCV 3.0 for Visual Studio 2015

asked 2015-04-16 07:55:57 -0600

zweistein666 gravatar image

I'm using Visual Studio 2015 Ultimate Preview and OpenCV 3.0 Alpha on windows 7 64bit. The project in VS is 32bit console application. I'm getting a linking error when I try to build a simple example just reading in an image in a Mat type. The errors are looking like:

1>opencv_core300d.lib(alloc.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1900' in solver.obj

1>opencv_core300d.lib(alloc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in solver.obj

After Googleing the issue, I learned that I have to recompile the OpenCV library in order to be linked with my project.

How can I do that? I can't find a makefile in opencv to import in VS and recompile from there. what is the solution?

edit retag flag offensive close merge delete

Comments

Maybe the tutorial will help

mshabunin gravatar imagemshabunin ( 2015-04-16 10:16:26 -0600 )edit

Thanks, this helps, but now I'm having trouble to rebuild with Cmake cuz ICV: Local copy of ICV package has invalid MD5 hash. It failed to download the ippcv automatically, and I don't know where to place after I downloaded the required version.

zweistein666 gravatar imagezweistein666 ( 2015-04-17 05:53:00 -0600 )edit

I have it in the following path:

opencv/3rdparty/ippicv/downloads/linux-8b449a536a2157bcad08a2b9f266828b/ippicv_linux_20141027.tgz

First, try to remove the downloads folder and run cmake again, it should download correct version. You can also build OpenCV without IPP: -DWITH_IPP=OFF

mshabunin gravatar imagemshabunin ( 2015-04-17 07:44:24 -0600 )edit