Ask Your Question

Revision history [back]

Static linking of OpenCV libraries in linux32

   I am using OpenCV for my project.

I am using eigen faces for face recognition. While compiling the program i use opencv_core, opencv_imgproc, opencv_highgui, opencv_objdetect, opencv_contrib libraries and i link them dynamically prefixing "-l" to each library. But my application needs to create a static executable file whi ch contains all the above libraries.

I found that we can statically link using archives. But i need ".o" files of all libraries to put in archive and then statically link. How can i create .o files of libraries. Presently i have only .so files in /usr/local/lib. Please help me in this matter.

click to hide/show revision 2
retagged

updated 2013-10-25 02:51:23 -0600

berak gravatar image

Static linking of OpenCV libraries in linux32

   I am using OpenCV for my project.

I am using eigen faces for face recognition. While compiling the program i use opencv_core, opencv_imgproc, opencv_highgui, opencv_objdetect, opencv_contrib libraries and i link them dynamically prefixing "-l" to each library. But my application needs to create a static executable file whi ch contains all the above libraries.

I found that we can statically link using archives. But i need ".o" files of all libraries to put in archive and then statically link. How can i create .o files of libraries. Presently i have only .so files in /usr/local/lib. Please help me in this matter.