I have this console helper class which connects to a color measurement instrument via a (bunch of) C libraries being declared into. Which works on Windows.
On macOS, issues started when trying to open the dylibs as they have not been signed by the manufacturer. I moved them into the main project, ran a build with App Wrapper, and now can basically open them in Terminal and list their symbols.
Anyway, when trying to run an external method, result is always “could not load function”.
I then tried DeclareLibraryMBS and connected classes (which is better to handle this way anyway as the main library has a callback method).
Result is an UnsupportedOperationException “Failed to read library”.
What does code look like and what is error message?
Usually you may need to sign libraries and app with same team to make them load.
or use entitlement to load any library.
Thank you, Christian. Got it installed now, and error is now
dlopen(/Users/uli/Documents/Repositories/Capture Desktop/CCMyiro9/CCMyiro9.debug/Frameworks/libFD9SDK.dylib, 0x000A): Library not loaded: @executable_path/…/frameworks/libopencv_highgui.2.4.7.dylib
Referenced from: <0C74E9B2-B1FB-30AB-A0A9-A9365B531737> /Users/uli/Documents/Repositories/Capture Desktop/CCMyiro9/CCMyiro9.debug/frameworks/libFD9SDK.dylib
Reason: tried: ‘/Users/uli/Documents/Repositories/Capture Desktop/CCMyiro9/frameworks/libopencv_highgui.2.4.7.dylib’ (no such file), ‘/usr/local/lib/libopencv_highgui.2.4.7.dylib’ (no such file), ‘/usr/lib/libopencv_highgui.2.4.7.dylib’ (no such file, not in dyld cache)
Mentioned library is in frameworks folder (and libFD9SDK too) – would that mean I have to load it in a similar way before?
More or less answer to myself:
Loading connected libs as DeclareLibraryMBS doesn’t help. Do you have any advice if a dlopen will make them shared for the system? You see core could be opened – seems to have no dependencies –, but highGUI still misses it.
D’oh!
Throws a few questions for me. Why did they make a device library GUI dependent? Why does it work on Windows console where even more libraries are involved?
(Not your task to answer. Thanks!)