I'm trying to create C# bindings using objective sharpie for the objective c library of OpenCV 3.4 (https://opencv.org/releases.html, precompiled and build from source with extra modules) but without success. Either I'm using the wrong sharpie parameters or something is wrong with the compiled opencv2.framework.
Tools/Versions:
- Sharpie 3.4.0
- Iphone11.2 SDK
- OpenCV 3.4.0 (precompiled and/or successfully build from source with extra modules)
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