0

I have an issue linking the provided opencv_world340.lib file to my application:

I downloaded the windows prebuilt version of Opencv 3.4.0 from here. I linked the opencv_world340.lib to my application with headers and runtime dll from the build\x64\vc14 folder to my Visual Studio 2015 C++ console application.

I am able to create a cv::Mat from file, it is well created in runtime, but when I try to convert it with .convertTo() (or use any further functionality of OpenCV) I got a LNK2019 linking issue that the function is not resolved. I though the opencv_world340.lib is a all_in_one file containing every module.

Am I missing something?

doodoroma
  • 157
  • 2
  • 11
  • Are you telling VS to search for libs in `build\x64\vc14\lib`? Is your project a x64? Are you in debug? Because you'll need `opencv_world340d.lib` then – Miki Feb 13 '18 at 10:25
  • Lib: Yes x64: Yes Debug: Yes -> Indeed this was the problem. Thanks for pointing it out. I don't really understand the reason though, I already used release lib in debug application. – doodoroma Feb 13 '18 at 10:58
  • glad it helpd. I closed as dupe of another question with the same solution. When there is memory management involved, you'd better use the correct build. For more details on this you can ask a new question (unrelated to OpenCV) – Miki Feb 13 '18 at 11:04

0 Answers0