compile static openCV library
Hi,
I'd like to compile my program with openCV as a static library, to create a standalone app. I've tried using the cmake flag BUILD_SHARED_LIBS=OFF, however when I try to run my app on an ubuntu machine without openCV installed, I get the following error:
./gray_static_v03.out: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
Here is a link to the dockerfile - where you can see my install commands: github.com/sknelson111/openCV/blob/master/Dockerfile
and here is the command I use to compile:
g++ -o gray.out gray.cpp `pkg-config opencv --cflags --libs --static`
Any ideas what I am doing wrong? Any help would be greatly appreciated!
Thank you!
also, please use opencv3.2, not 3.0