Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception has occurred.ArgumentError (Invalid argument(s): Failed to lookup symbol 'Image_IMRead': dlsym(RTLD_DEFAULT, Image_IMRead): symbol not found) #24

Closed
kitittat7j opened this issue Apr 10, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@kitittat7j
Copy link

kitittat7j commented Apr 10, 2024

Describe the bug
when I run the code on Simulator (17.4 version) and Ios real device. I got those message Failed to lookup symbol 'Image_IMRead': dlsym(RTLD_DEFAULT, Image_IMRead): symbol not found) when i click to use the function cv.imread("some image")

To Reproduce
Steps to reproduce the behavior:

  1. Run simulator
  2. run opencv to read the image
  3. See error

Screenshots
Screenshot 2567-04-10 at 17 19 26

opencv_dart : 1.0.0+1
flutter version : 3.16.9

@kitittat7j kitittat7j added the bug Something isn't working label Apr 10, 2024
@rainyl
Copy link
Owner

rainyl commented Apr 10, 2024

I just tested it on simulator and it worked fine.
image

And I checked the symbols of opecv_dart.framework with

symbols opencv_dart | grep IMRead

and it shows the symbol exists
image

So, please check your opencv_dart version and whether you have run dart run opencv_dart:setup after added.

I have updated my test code in https://github.com/rainyl/opencv_dart/tree/main/example , (remember change opencv_dart to v1.0.0+1 in pubsepc.yaml, 1.0.0+2 not published yet), then run setup and example

@rainyl
Copy link
Owner

rainyl commented Apr 10, 2024

BTW, also note that every time you want to switch between different arch, you need to run setup again, for example, if you develop and test on a simulator, you need to run dart run opencv_dart:setup ios -a x64, now you want to switch to a real device, you need to run dart run opencv_dart:setup ios -a arm64, this is because the opencv_dart.framework will be placed in opencv_dart/ios, for both arch.

@kitittat7j
Copy link
Author

i also run dart run opencv_dart:setup ios -a arm64.It work fine.thank you

@rainyl
Copy link
Owner

rainyl commented Apr 10, 2024

You are welcome, if solved, please close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants