Ask Your Question

opencv_core 249d.dll is missing from your computer

asked 2014-07-27 22:41:02 -0600

JOhn12341234 gravatar image

updated 2014-07-28 09:15:58 -0600

I don't want my program to be dependent on any OpenCV dlls. I want it to pull whatever it determines it needs from the lib or source files.

I have followed the tutorial ( and double checked everything.

I have: MyProgram > Properties > C/C++ > General: Additional Include Directories set to: C:\OpenCV\build\include

MyProgram > Properties > Linker > General: Additional Library Directories set to: C:\OpenCV\build\x86\vc12\lib

MyProgram > Properties > Linker > Input: Additional Dependencies set to: opencv_core249d.lib opencv_imgproc249d.lib opencv_highgui249d.lib opencv_ml249d.lib opencv_video249d.lib opencv_features2d249d.lib opencv_calib3d249d.lib opencv_objdetect249d.lib opencv_contrib249d.lib opencv_legacy249d.lib opencv_flann249d.lib

I'm using visual studio 2013 on windows 8. What am I doing wrong here?

Possible Solution: MyProgram > Properties > C/C++ > Code Generation > Runtime Library: Multi-Threaded (/MT)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-07-28 01:59:43 -0600

So basically you forgot to tell your compiler that you want to built your executable as a static lib and thus be not dependant on installations of the user. This can be done in your project build/compiler options, where you should switch the /md option to /mt.

HOWEVER, do keep in mind that this means everything is now statically linked. This means you will need to include all windows dependencies yourself since that was done automatically. Look at this topic to see which errors can occur.

edit flag offensive delete link more


I made this modification and still get the same error: MyProgram > Properties > C/C++ > Code Generation > Runtime Library: Multi-Threaded (/MTd) ()for debug) MyProgram > Properties > C/C++ > Code Generation > Runtime Library: Multi-Threaded (/MT) (for release)

JOhn12341234 gravatar imageJOhn12341234 ( 2014-07-28 09:17:20 -0600 )edit

JOhn, - you will have to rebuild the opencv libs statically, before you can do static linking. just switching one c-runtime against the other won't do.

berak gravatar imageberak ( 2014-07-28 09:24:04 -0600 )edit

Is there a write-up on how to do that with VS13 and Win8? I think there is already a staticlib folder that came with openCV. Shouldn't I be able to just use that?

JOhn12341234 gravatar imageJOhn12341234 ( 2014-07-28 09:37:28 -0600 )edit

oh, if there's a staticlib folder already, - ignore me.

berak gravatar imageberak ( 2014-07-28 09:43:58 -0600 )edit

That doesn't solve the problem totally though. I had to use this write up:

What is amazing is that this isn't front-page of the tutorial. This is important stuff that lots of people have to go through. It shouldn't be something someone has to hope is explained on stackOverflow somewhere..

JOhn12341234 gravatar imageJOhn12341234 ( 2014-07-28 09:53:26 -0600 )edit

thanks, lifesaver JOhn12341234

kennyMacLean gravatar imagekennyMacLean ( 2014-11-19 19:11:41 -0600 )edit

Question Tools


Asked: 2014-07-27 22:41:02 -0600

Seen: 22,097 times

Last updated: Jul 28 '14