I am trying to create a DLL using the Visual Studio 12 community, which depends on OpenCV.
I want to include OpenCV in .lib files, so I do not need to distribute it separately, but I need my file to be created as a DLL.
But I can not configure Visual Studio to import lib into a DLL. If in
My project → Properties → Configuration Properties → General → Configuration Type,
I select "static library (.lib)" and in:
My project → Properties → Configuration Properties → VC ++ Directories → Library Directories,
I choose the path to the OpenCV.lib files and
My project -> Properties -> Configuration Properties -> Connector -> Dependencies
I add a link to every .lib, it works.
But if I changed the configuration type, make a "dynamic library (DLL)", Visual studio tells me:
opencv_highgui2410d.lib(window.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in VectorsImport.obj
It seems I can only do .lib files with .lib files. But that seems unlikely. I looked through this, but I only find manuals on how to create .lib or .dll files, or one from the other. It should be pretty simple, but I can't figure it out. I'm used to Linux where .o can be easily included in .so. It puzzles me.