liujiakuoyx / leak_detector

flutter memory leak detector.
BSD 2-Clause "Simplified" License
133 stars 24 forks source link

Undefined symbols for architecture arm64: #3

Closed GP-Moon closed 2 years ago

GP-Moon commented 3 years ago

Undefined symbols for architecture arm64: "value witness table for Builtin.UnknownObject", referenced from: full type metadata for leak_detector.SwiftLeakDetectorPlugin in libleak_detector.a(SwiftLeakDetectorPlugin.o) "swift_FORCELOAD$_swiftCompatibilityDynamicReplacements", referenced from: swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_leak_detector) "swift_FORCELOAD$_swiftCompatibility51", referenced from: swift_FORCELOAD$swiftCompatibility51$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: __swift_FORCELOAD$swiftCompatibility51$_leak_detector) "swift_FORCELOAD$_swiftCompatibility50", referenced from: swift_FORCELOAD$swiftCompatibility50$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftCompatibility50$_leak_detector) "swift_FORCELOAD$_swiftQuartzCore", referenced from: swift_FORCELOAD$swiftQuartzCore$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftQuartzCore$_leak_detector) "swift_FORCELOAD$_swiftCoreImage", referenced from: swift_FORCELOAD$swiftCoreImage$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: __swift_FORCELOAD$swiftCoreImage$_leak_detector) "swift_FORCELOAD$_swiftCoreGraphics", referenced from: swift_FORCELOAD$swiftCoreGraphics$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftCoreGraphics$_leak_detector) "swift_FORCELOAD$_swiftCoreFoundation", referenced from: swift_FORCELOAD$swiftCoreFoundation$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftCoreFoundation$_leak_detector) "_swift_getObjectType", referenced from: static leak_detector.SwiftLeakDetectorPlugin.register(with: C.FlutterPluginRegistrar) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "swift_FORCELOAD$_swiftUIKit", referenced from: swift_FORCELOAD$swiftUIKit$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftUIKit$_leak_detector) "_swift_allocObject", referenced from: @objc leakdetector.SwiftLeakDetectorPlugin.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "static (extension in Foundation):Swift.String._unconditionallyBridgeFromObjectiveC(C.NSString?) -> Swift.String", referenced from: leakdetector.SwiftLeakDetectorPlugin.handle(: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "_swift_getInitializedObjCClass", referenced from: type metadata accessor for C.FlutterMethodChannel in libleak_detector.a(SwiftLeakDetectorPlugin.o) type metadata accessor for leak_detector.SwiftLeakDetectorPlugin in libleak_detector.a(SwiftLeakDetectorPlugin.o) leakdetector.SwiftLeakDetectorPlugin.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "swift_FORCELOAD$_swiftFoundation", referenced from: swift_FORCELOAD$swiftFoundation$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: __swift_FORCELOAD$swiftFoundation$_leak_detector) "swift_FORCELOAD$_swiftCoreAudio", referenced from: swift_FORCELOAD$swiftCoreAudio$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftCoreAudio$_leak_detector) "static Swift.String.+ infix(Swift.String, Swift.String) -> Swift.String", referenced from: leakdetector.SwiftLeakDetectorPlugin.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "swift_FORCELOAD$_swiftDarwin", referenced from: swift_FORCELOAD$swiftDarwin$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftDarwin$_leak_detector) "_swift_unknownObjectRelease", referenced from: static leak_detector.SwiftLeakDetectorPlugin.register(with: C.FlutterPluginRegistrar) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) @nonobjc C.FlutterMethodChannel.allocating_init(name: Swift.String, binaryMessenger: C.FlutterBinaryMessenger) -> C.FlutterMethodChannel in libleak_detector.a(SwiftLeakDetectorPlugin.o) @objc static leak_detector.SwiftLeakDetectorPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) reabstraction thunk helper from @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () to @escaping @callee_guaranteed (@in_guaranteed Any?) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "swift_FORCELOAD$_swiftDispatch", referenced from: swift_FORCELOAD$swiftDispatch$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftDispatch$_leak_detector) "_swift_release", referenced from: leakdetector.SwiftLeakDetectorPlugin.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleakdetector.a(SwiftLeakDetectorPlugin.o) swift_destroy_boxed_opaque_existential_0 in libleak_detector.a(SwiftLeakDetectorPlugin.o) @objc leakdetector.SwiftLeakDetectorPlugin.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "_swift_deallocObject", referenced from: l_objectdestroy in libleak_detector.a(SwiftLeakDetectorPlugin.o) "swift_FORCELOAD$_swiftMetal", referenced from: swift_FORCELOAD$swiftMetal$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: __swift_FORCELOAD$swiftMetal$_leak_detector) "_swift_retain", referenced from: leakdetector.SwiftLeakDetectorPlugin.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "swift_FORCELOAD$_swiftObjectiveC", referenced from: swift_FORCELOAD$swiftObjectiveC$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftObjectiveC$_leak_detector) "_swift_unknownObjectRetain", referenced from: @objc static leak_detector.SwiftLeakDetectorPlugin.register(with: C.FlutterPluginRegistrar) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "Swift._bridgeAnythingToObjectiveC(A) -> Swift.AnyObject", referenced from: reabstraction thunk helper from @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () to @escaping @callee_guaranteed (@in_guaranteed Any?) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "_swift_getObjCClassMetadata", referenced from: type metadata accessor for C.FlutterMethodChannel in libleak_detector.a(SwiftLeakDetectorPlugin.o) @objc static leak_detector.SwiftLeakDetectorPlugin.register(with: C.FlutterPluginRegistrar) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "(extension in Foundation):Swift.String._bridgeToObjectiveC() -> C.NSString", referenced from: @nonobjc C.FlutterMethodChannel.allocating_init(name: Swift.String, binaryMessenger: C.FlutterBinaryMessenger) -> C.FlutterMethodChannel in libleak_detector.a(SwiftLeakDetectorPlugin.o) "_swift_getObjCClassFromMetadata", referenced from: @nonobjc C.FlutterMethodChannel.allocating_init(name: Swift.String, binaryMessenger: C.FlutterBinaryMessenger) -> C.FlutterMethodChannel in libleak_detector.a(SwiftLeakDetectorPlugin.o) "swift_FORCELOAD$_swiftCoreMedia", referenced from: swift_FORCELOAD$swiftCoreMedia$_leak_detector in libleak_detector.a(SwiftLeakDetectorPlugin.o) (maybe you meant: swift_FORCELOAD$swiftCoreMedia$_leak_detector) "type metadata for Swift.String", referenced from: leakdetector.SwiftLeakDetectorPlugin.handle(: C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "_swift_bridgeObjectRelease", referenced from: @nonobjc C.FlutterMethodChannel.allocating_init(name: Swift.String, binaryMessenger: C.FlutterBinaryMessenger) -> C.FlutterMethodChannel in libleak_detector.a(SwiftLeakDetectorPlugin.o) leakdetector.SwiftLeakDetectorPlugin.handle(: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) "Swift.String.init(_builtinStringLiteral: Builtin.RawPointer, utf8CodeUnitCount: Builtin.Word, isASCII: Builtin.Int1) -> Swift.String", referenced from: static leak_detector.SwiftLeakDetectorPlugin.register(with: C.FlutterPluginRegistrar) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) leakdetector.SwiftLeakDetectorPlugin.handle(: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libleak_detector.a(SwiftLeakDetectorPlugin.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

liujiakuoyx commented 3 years ago

I think it has something to do with the configuration of your iOS project