locked
How to successfully bind OpenCV 3.4 iOS with Objective Sharpie 3.4.0? RRS feed

  • Question

  • User365125 posted

    Hello,

    I'm trying to generate bindings with Objective Sharpie 3.4.0 for OpenCV 3.4.0 iOS but have no success so far. Maybe someone can give me some hints what I'm doing wrong.

    My source:

    • OpenCV 3.4.0 iOS Pack (have a look at opencv releases => iOS pack), which contains a *.framework directory with headers and an .a fat library (without extra opencv_contrib modules).
    • Alternatively I successfully compiled my own OpenCV 3.4.0 version with opencv_contrib modules from source. Both behave the same regarding issues.

    Other tools/versions:

    • Iphone11.2 SDK

    What I tried: I tried the following sharpie parameters (when current dir contains opencv2.framework):

    $ sharpie bind -framework opencv2 $ Done. Exiting with error code 1. error: opencv2: Umbrella header file does not exist: opencv2.framework/Headers/opencv2.h $ That is because the umbrella file is Headers/opencv.hpp. So i changed the parameters to: $ sharpie bind -fx-umbrella opencv2.framework/Headers/opencv.hpp -framework opencv2
    Done. Exiting with error code 1. error: opencv2: Umbrella header file does not exist: opencv2.framework/Headers/opencv2.h $ which completely gets ignored in every order.

    I also tried many other possibilities like defining only the .a file (in combination with removing included libs with lipo):

    $ sharpie bind opencv2.a Parsing 1 header files... warning: [SomePath]/opencv2.a: 'linker' input unused [-Wunused-command-line-argument] warning: argument unused during compilation: '-c' [-Wunused-command-line-argument] warning: argument unused during compilation: '-fno-spell-checking' [-Wunused-command-line-argument] warning: argument unused during compilation: '-Xclang -detailed-preprocessing-record' [-Wunused-command-line-argument] error: unable to handle compilation, expected exactly one compiler job in '' Error while processing [SomePath]/opencv2.a. Done. Exiting with error code 1. error: Clang failed to parse input and exited with code 1 $ or addressing the umbrella header directly with: $ sharpie bind Headers/opencv.hpp which fails because "opencv2/...hpp" file not found because every included hpp refers to "opencv2/..." structure

    Wednesday, January 31, 2018 11:52 AM

All replies

  • User367035 posted

    I am facing the same issue :(

    Wednesday, May 16, 2018 10:13 AM
  • User323310 posted

    any solution or workaround for this issue? @WeitesFeld did you solve your problem?

    Thursday, July 25, 2019 11:22 AM
  • User372994 posted

    @stepkillah did you find a solution?

    Thursday, May 21, 2020 8:09 AM