rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter. Support Asynchronous Now!
https://pub.dev/packages/opencv_dart
Apache License 2.0
136 stars 18 forks source link

Failed to lookup symbol 'Mat_New': dlsym(RTLD_DEFAULT, Mat_New): symbol not found #251

Closed fpcxsun closed 1 month ago

fpcxsun commented 1 month ago

Describe the bug Failed to lookup symbol 'Mat_New': dlsym(RTLD_DEFAULT, Mat_New): symbol not found

To Reproduce Flutter 3.22.3 opencv_dart 1.2.3 crash in iOS, work fine in Android

Smartphone (please complete the following information):

Additional context [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'Mat_New': dlsym(RTLD_DEFAULT, Mat_New): symbol not found

0 DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33:70)

1 CvNativeCore._Mat_NewPtr (package:opencv_dart/src/g/core.g.dart:3016:80)

2 CvNativeCore._Mat_NewPtr (package:opencv_dart/src/g/core.g.dart)

3 CvNativeCore._Mat_New (package:opencv_dart/src/g/core.g.dart:3018:25)

4 CvNativeCore._Mat_New (package:opencv_dart/src/g/core.g.dart)

5 CvNativeCore.Mat_New (package:opencv_dart/src/g/core.g.dart:3010:12)

6 new Mat.empty. (package:opencv_dart/src/core/mat.dart:116:23)

7 cvRun (package:opencv_dart/src/core/base.dart:83:76)

8 new Mat.empty (package:opencv_dart/src/core/mat.dart:116:5)

9 imdecode (package:opencv_dart/src/imgcodecs/imgcodecs.dart:96:15)

rainyl commented 1 month ago

@fpcxsun refer to #200 , https://github.com/rainyl/opencv_dart/issues/200#issuecomment-2278057007

Remember to take a look at Q&A (#212) first.

fpcxsun commented 1 month ago

I add it by myself,then it work.

image
xiazhichao commented 1 month ago

when create Mat object,Not work and I add it in embedded content,Is there a solution?