Deploying OpenCV C ++ Applications with External Libraries

I tried searching for a LOT for this with no luck (perhaps because I am not using the correct technical terms). My problem is mainly related to linking static libraries, compiling and deploying. Before I go into detail, my executables compile fine on my system; the main problem is how to deploy them as a working solution for others.

I wrote basic C ++ - exe image processing, which uses OpenCV static libraries (I will link them in VC ++ using Project> Properties> Linker> add additional dependencies, as standard). I will compile by specifying the necessary files, setting the VC ++ parameters ... basically, it all compiles fine. Now I want to be able to deploy this to another PC. I understand that I will need the exe + static libs version ... is there anything else?

Some of the libs rely on the use of libjpeg and libpng; I do not think they are included as a standard. In addition, I set the linker path to static libs as relative (e.g. / libs resources), so it is system independent, so it knows where to find the libraries. The main OpenCV data structures work fine (like CvPoint), but when I try to load an image using CvLoadImage, the application crashes. If instead I use the standard ifstream fopen, I can open the file without problems (but it seems it cannot get into the IplImage OpenCV image structure - does anyone know how to do this? Perhaps this can be done with IplImage-> imageData.),

Any help is greatly appreciated. Thank!

+3
1

( ) . exe .

OpenCV , dll libpng/libjpeg. OpenCV , API LoadLibrary/dlopen . , , , . , libpng/libjpeg.

- .lib , , DLL , , , .lib , DLL exe..

+1

Source: https://habr.com/ru/post/1769203/


All Articles