Combining multiple static libraries in opencv to single shared library [closed]

asked 2014-07-23 17:03:25 -0600

rgadde gravatar image

updated 2014-07-23 17:06:41 -0600

Is there any way we can combine multiple static libraries (.a) files like libopencv_core.a libopencv_imgproc.a etc in to single .so file like libopencv.so?

I tried to combine using this command,

arm-linux-g++ -D_REENTRANT -fPIC -shared -o ./(OUT_DLL) -L/localpath/to/opencv/lib/ -lopencv_features2d -lopencv_flann -lopencv_objdetect -lm -lopencv_ml -lopencv_highgui -lopencv_imgproc -lopencv_core -L/localpath/to/3rdparty/lib/ -llibjpeg -llibtiff -lzlib -llibjasper -llibpng -lpthread -lrt -lIlmImf

to creare libopencv.so. But when I am creating an application with this .so file it gives error saying undefined reference to cv:Mat etc., which suggest my .so file doesnt contain the symbols from .a files.

I also tried un-archiving .a files to .o files and create opencv.so from object files. Seems it almost works, but it gives few errors saying

 `undefined reference to `icvCvt_BGRA2RGBA_16u_C4R(unsigned short const*, int, unsigned short*, int, CvSize)'`,

which are bit strange errors. Please help. Note: I am compiling using arm-g++

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-06 23:22:29.347701

Comments

1