How to link my binary with static library (opencv)

asked 2018-04-25 09:35:31 -0500

Thiyaga gravatar image

Hi ,

I am using MAC OS - High Sierra. And build my OpenCV project with Xcode (in C++).

Now, I have a working binary. Now I need to run this binary in an other MAC OS which does not have OpenCV. I was recommended to use a binary with a static library linked.

When I search online, I got more links like the one ->HERE says to use CMake -> cmake with "-D BUILD_SHARED_LIBS=OFF" . I am very new to CMake. Please help me if you have solved this problem and clear my below doubts


  1. How do I export an xcode project to cmake?
  2. Where do I modify cmake with "-D BUILD_SHARED_LIBS=OFF"
  3. Can I run this on Windows or Linux machine? Are these cross compatible binaries? If not how can I make it cross compatible?
edit retag flag offensive close merge delete