Ask Your Question

Revision history [back]

How to statically compile my program with openCV in Linux?

I want to statically compile my C++ program with openCV in Linux so that my program could be a stand alone program that could run on any other computers without openCV installed. But I'm totally at lost of what to do now. I need some tutorial materials with each steps and instructions on that. I've used cmake but I can't find a proper file to set something like shared_library=OFF, static_library=ON. Also, I have found that my openCV has a lot of dependencies, i.e. dynamically linked libraries which all require to be compiled. I've searched a lot of web pages, but all of them just show a little part of the whole progress. No one could give me a complete instruction on each steps. However, in a word, I want to find a complete tutorial on how to statically compile my program with openCV in Linux. Could anyone help me and provide some? Thanks very much!