I am migrating my software from OpenCv 3.2.0 to 4.10.0. I need to have support of the dnn_superres module. So I have to build OpenCV myself.
Thanks to this topic I successfully compiled the monolithic library. Here the release .LIB and .DLL i obtained:
Now when I build my software while linking with opencv_world4100.lib i get linking errors:
1>Core.lib(Image.obj) : error LNK2001: unresolved external symbol “void __cdecl cv::cvtColor(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,int,int)” (?cvtColor@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@HH@Z)
1>Core.lib(ForwardLighting.obj) : error LNK2001: unresolved external symbol “void __cdecl cv::cvtColor(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,int,int)” (?cvtColor@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@HH@Z)
1>AssetPanel.obj : error LNK2001: unresolved external symbol “void __cdecl cv::cvtColor(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,int,int)” (?cvtColor@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@HH@Z)
1>Core.lib(BaseModel.obj) : error LNK2001: unresolved external symbol “void __cdecl cv::cvtColor(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,int,int)” (?cvtColor@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@HH@Z)
1>Core.lib(RenderLights.obj) : error LNK2001: unresolved external symbol “void __cdecl cv::cvtColor(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,int,int)” (?cvtColor@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@HH@Z)
1>Core.lib(DX12Renderer.obj) : error LNK2001: unresolved external symbol “void __cdecl cv::cvtColor(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,int,int)” (?cvtColor@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@HH@Z)
However linking with the opencv_world4100.lib from OpenCV 4.10.0 .exe package works.
Please am i missing anything?
I have a workaround that is working:
- I use the opencv_world4100.lib from github .EXE package
- I manually compile a non monolithic build including the extra modules
- I link with opencv_dnn_superres4100.lib in addition to opencv_world4100.lib from OpenCV 4.10.0 .exe
This works but i would like to do the things properly. Especially since I would need to compile OpenCV with OPENCV_IMGCODECS_USE_OPENEXR enabled