I understand the concept of static and dynamic binding. It is known that there are dynamic libraries on the Windows .dll platform, and .lib are static libraries.
My confusion: I created a project in which I had to use the OpenCV libraries. Basically, I had to use the following 5 OpenCV libraries:
-lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_videoio
For this purpose, in the project properties, I had to specify the compiler path to the libraries in the Additional Library Directory VS 2012, and I also had to tell the linker about the .lib libraries that I want to use for the project. The project was compiled without errors. But when I try to start the project, he said that videoio.dll missing (same error for other libraries). As soon as I copied the .dll files inside the folder where the .exe present, the project went fine.
Question: Why did I have to copy .dll files when I already linked the static libraries ( .lib )?
Further question: When I use Eclipse on Mac OS or Linux, I just need to report this, where the OpenCV libraries are present, and the linker that I want to use in other OpenCV libraries. In this case, I never had to put dynamic libraries in the .exe folder.
source share