Link thirdparty dynamically

asked 2017-08-10 04:30:33 -0500

vidstige gravatar image

I'm building static OpenCV 3.0.0 using DBUILD_SHARED_LIBS=OFF working fine producing a beautiful .a file. However, thirdparty libraries such as libjasper and libwebp are linked into this static library (libopencv_imgproc). I would like to create static opencv libraries, but link libjasper and libwebp dynamically as these are very easy to install using apt.

edit retag flag offensive close merge delete

Comments

1

". However, thirdparty libraries such as libjasper and libwebp are linked into this static library (libopencv_imgproc)" -- this is simply not true. you're responsible to link your program to all of opencv_imgproc's dependancies (also in the correct order) in the end.

what are you trying to achieve here ? to my knowledge, it's much better, to use the opencv supplied 3rdparty libs (statically), than depend on your system's dynamic libs (which always might differ in subtle, unforseen ways, causing trouble)

berak gravatar imageberak ( 2017-08-10 04:48:43 -0500 )edit