0

I'm trying to get dart bindings for a static library to work on iOS.
So far, I've gotten the plugin's example project to compile, but I get the following error when I try to use the native functions at runtime:

Invalid argument(s):
Failed to lookup symbol 'NDIlib_version': dlsym(RTLD_DEFAULT, NDIlib_version):
symbol not found

From what I've read, it may be caused by XCode excluding the library while optimizing the app because it doesn't detect that the library is being used.

So far, I've tried turning off dead code stripping in XCode, but it didn't make a difference:
https://github.com/dart-lang/ffi/issues/41#issuecomment-645550964

Here's a minimal project that can be used to reproduce the error:
https://github.com/jvkolyadich/libndi_bindings

Any help would be appreciated.

James K
  • 1
  • 1

2 Answers2

0

Try setting the Strip Linked Product to No.

build settings

David Skelly
  • 617
  • 6
  • 5
0

I faced the same issue resolved by following steps, if you have any confusion please let me know, try this answer How to Link Lib.a in IOS, static as well as dynamic linking? , Change Strip_Style to Non Global also. as mentioned in the official docs.