I have a local sample project in a VS solution (one source file importing openCV headers, creating an empty image and displaying it).
I want to include any dependencies the project needs in the same folder, which I intend to git in a private repository. I don’t rally understand linking.
On my local machine I did the following:
- Moved the .lib files and the include files to the solutions’ folder.
- Configured the projects’ configuration properties:
-C/C++: Additional Include Directories
-Linker: Additional Library Directories and input (.lib files)
The project builds fine, but in debugging phase, the console throws some warnings, such as:
> [ INFO:0] global C:\Users\DICAM39\Downloads\opencv-4.5.2\sources\modules\core\src\utils\plugin_loader.impl.hpp (67) cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_openmp452_64d.dll => FAILED
After some searching I found out, that it has something to do with load-time linking vs run-time linking of the .dlls.
Anyways, on other machines the same solution does not work, because the .lib files seem to refer to the .dlls in the original output folder (from where the .libs where also copied); not present on any other but the main PC (where the original project files were).
How can I create a solution, which would work on any machine (with the same processor architecture and operating system of course)?
Should I just copy all the .dlls to the folder in which the executable from my source code will be generated? Seems like an odd and dirty method for doing it.