westracer / flutter_native_opencv

Using OpenCV natively in C++ in a Flutter app with Dart FFI
https://medium.com/flutter-community/integrating-c-library-in-a-flutter-app-using-dart-ffi-38a15e16bc14
MIT License
215 stars 38 forks source link

ArgumentError (Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, process_image): symbol not found)) #5

Closed ricardochen closed 3 years ago

ricardochen commented 3 years ago

Hi,

I'm trying to make this work on iOS but I'm getting this error in debug: ArgumentError (Invalid argument(s): Failed to lookup symbol (dlsym(RTLD_DEFAULT, process_image): symbol not found))

I don't see any reference of native_opencv inside Podfile.lock I'm using a local clone of the repo, since I edited the cpp function and added the stitching library.

On Android works fine.

Any ideas?

Flutter (Channel dev, 2.1.0-12.1.pre, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-US) ffi: ^1.0.0 OpenCV – 4.5.2

ricardochen commented 3 years ago

For some reason with my environment i had to add this line to my pod file. pod 'native_opencv', :path => '../native_opencv/ios'

I'll leave this here in case someone needs it.

Also had to remove opencv2/opencv.hpp and use imgcodecs.hpp instead

AngelUrq commented 3 years ago

Did you install AVFoundation? If that's the case, where did you download it? Thanks for your reply in advance.

westracer commented 3 years ago

Hello. There was a problem related to the new Flutter plugin system. I've updated pubspec - everything should be working now.

westracer commented 3 years ago

Did you install AVFoundation? If that's the case, where did you download it? Thanks for your reply in advance.

AVFoundation framework comes with Xcode, you don't need to download it. To include the framework with a project, there's a parameter in native_opencv.podspec:

  # including native framework
  s.frameworks = 'AVFoundation'