CMakefile settings required for building x64 bit On windows10 both static/dynamic libraries that complies with VS2013 and can be used directly in Qt Creator 5.5

asked 2015-10-09 10:13:37 -0500

sunsina gravatar image

After spending a lot of time googling/building and compiling I realized that OpenCV 3.0 does not come with a useful static libraries that I can implement it directly in Qt5.5 Despite the fact that I managed to compile and use the bundled+build OpenCV 3.0 staticlibs/64bit in the VS2013 but neither my built nor the bundled built libraries could be implemented in Qt5.5 (even using very same VS2013 WIN64 as compiler in Qt as build kit)

I got several errors during implementation in Qt5.5 and I was advised to build OpenCV 3.0 from scratch in order to be useful in Qt5.5.

I am wondering why the bundled OpenCV3.0 zip file does not contain any .dll files for each of its static libs counterpart!?

I would not like to consider using MINGW instead of VS2013 compiler, and I want 64bit build both static+dynamic libraries working in Win64 Env ready for debug and release purposes.

In Qt I struggled with many VC2013 linker issues such as

Linker unknown ref error: LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj

MT and MD issues in compilation (Multi threaded,...)

IlmImf.lib(ImfOutputFile.obj):-1: error: LNK2001: unresolved external symbol "private: static int std::locale::id::_Id_cnt" ([email protected]@[email protected]@@0HA)

msvcrt.dll already contain symbol ,......

I am wondering why the implementation of the prebeuilt static libraries in the Qt5.5 is so difficult despite the fact that I can easily implement those particular rbuilt libraries that resides in /x64/vc12 .lib and *d.lib files in VS2013 flawlessly, but even by implementation VS2013/Win64 compiler+linker in Qt5.5 (Very same environment) I can not manage to compile it properly.

So I would like to know if any one who has managed to compile OpenCV3.0 source in CMake or as VC .sln file with VisualC 2013 compiler and he/she could easily use implement his/her compiled libraries in Qt5.5 to share his CMake settings with .sln files tweak or even Qt .pro with me, I will really appreciate it. Thanks

edit retag flag offensive close merge delete


I literally spent a day or more on getting this to work without any result. I guess it's an ABI issue like stated here:

I just want to use all the highgui qt features and the contrib modules but I don't see a way to make this work in VS2013. Building OpenCV300 with Qt5.5 (WITH_QT flag in CMAKE) and the contrib modules is not working, as I wrote here: But building the same with MINGW wont work either. I'm totally lost now and wonder how I get a configuration/build that lets me use this

RetroHelix gravatar imageRetroHelix ( 2015-10-10 15:21:13 -0500 )edit

I wish I was coming here to say I had an answer, but I'm actually coming here because I spent the last week tearing my hair out trying to resolve the same problem. I hope someone has a workable solution to share for this problem.

bgwoodward gravatar imagebgwoodward ( 2015-10-11 12:11:38 -0500 )edit