Levi-Lesches / opencv_ffi

An FFI-based implementation of OpenCV in Dart
https://pub.dev/packages/opencv_ffi
Other
18 stars 1 forks source link

Failed to load dynamic library #17

Open stevanusdk opened 1 year ago

stevanusdk commented 1 year ago

Hi Levi, I am creating a brand new app using the example code in MacOS, but I got an error saying that :

Failed to load dynamic library 
'opencv_ffi.dylib': dlopen(opencv_ffi.dylib, 1): image not found

I have tried to change the library dylib path but no luck, Is the plugin working on MacOS? Do I need to build the openCV folder?

Flutter Version: Flutter 3.13.0 ffigen : ^9.0.0 (tried 6.1.2)

thank you for your amazing plugins

Best Regards

Levi-Lesches commented 1 year ago

Yes, you do need to build opencv with cmake in the src folder, then get Dart to recognize your .dylib files. I personally do not have a Mac device so it's hard for me to test, but if you can get it working I'd be interested in hearing how so I can document it!

Levi-Lesches commented 9 months ago

Hi @stevanusdk, I made a change at https://github.com/Levi-Lesches/opencv_ffi/commit/fb721ce518faa62b470c73ae58edfe825a5f9052 according to @tomtom101 in #19. Can you try adding the following to your pubspec.yaml, running flutter pub get and trying again?

dependency_overrides:
  opencv_ffi: 
    git: https://github.com/Levi-Lesches/opencv_ffi.git
fusionconsulting commented 8 months ago

Hi Levi, I am creating a brand new app using the example code in MacOS, but I got an error saying that :

Failed to load dynamic library 
'opencv_ffi.dylib': dlopen(opencv_ffi.dylib, 1): image not found

I have tried to change the library dylib path but no luck, Is the plugin working on MacOS? Do I need to build the openCV folder?

Flutter Version: Flutter 3.13.0 ffigen : ^9.0.0 (tried 6.1.2)

thank you for your amazing plugins

Best Regards

Did you get this building on MacOS? I'd be interested to know if it works.