Current location - Quotes Website - Personality signature - Unable to load dynamic library.
Unable to load dynamic library.
The helloworld sample of Dart ffi cannot be run.

Unhandled exception:

Invalid parameter: Cannot load dynamic library (dlopen (. /hello_library/libhello.dylib, 1): No suitable picture found. ? Found it:

File system relative paths are not allowed in hardening programs)

#0 ? _ open(dart:FFI-patch/FFI _ dynamic _ library _ patch . dart: 1 1:55)

# 1 ? new dynamic library . open(dart:FFI-patch/FFI _ dynamic _ library _ patch . dart:20: 12)

#2 ? main(file:///Users/chenjiangfeng/github/dart-samples/FFI/hello _ world/hello . dart: 18:36)

#3 ? _ Start quarantine. & lt Close Anonymous & gt (dart: isolate-patch/isolate _ patch.dart: 301:19)

#4 ? _RawReceivePortImpl。 _ handle message(dart:isolate-patch/isolate _ patch . dart: 168: 12)

Signature problem.

Dart sdk has been signed. To call dylib, the called dylib needs to be signed with dart, but you don't have the signature of dart sdk.

Solution: Clear the signature of dart sdk.

Co-design-Delete-Sign `Which dart'