I created on Visual Studio 2017 a DLL in C++ with a C wrapper and I am using the OpenCV
library. I installed OpenCV
on my computer, add the path of the .lib
and .dll
files in my project, and like this I am able to use my DLL in others programs. To be precise, I have now OpenCV on a folder C:\opencv\...
and my visual studio solution on C:\MG\DLL\MyDll.sln
.
But, in order to use it on another computer, I won't be able to install OpenCV
so I have to find how to package the OpenCV
library to distribute the correct files with my .dll
file. Maybe I juste have to copy the .dll
files of OpenCV
in the same folder of my DLL ?
I don't know how to deal with this, because on internet I saw some people talking for example about CMake
, others including some files in the project, ...
Moreover, I try to simulate this using a software in which I can add a C# plugin which use my C++ DLL. In this case, I rename the OpenCV
folder to be sure the link with this folder is broken. If I copy the .dll
files of OpenCV
, the plugin is not functional anymore after renaming the installation folder of OpenCV
.
Thank you in advance for sharing your experience/knowledge ;)
I solved my problem.
Copying the .dll
files is not enough. I needed to add to the PATH environment variable the folder where my DLL is with the software.
Next step, do the same thing with my Python program with doesn't recognize the openCV dll when I rename the installation folder.
if you solve this problem by your self than just remove question form here, This place for asking and get a help from other not showing your knowledge on own question.
I can't because people answered me. It is why I add the solution and will close the topic tomorrow when I will be able to.
@KartikMaheshwari That's incorrect. Stack Overflow actively encourages users to answer their own questions. stackoverflow.com/help/self-answer