I'm building a MAUI app that includes a NativeLibraryInterop based closely on the Firebase sample.
The NativeLibraryInterop project builds successfully. However, when I build the apps project itself, I get a bunch of errors related to the interfaces.
clang++ exited with code 1:
// a path
"OBJC_CLASS$_MauiFIRApp", referenced from:
// a path
error : Undefined symbols for architecture arm64:
How do I fix this?
I'm building a MAUI app that includes a NativeLibraryInterop based closely on the Firebase sample.
The NativeLibraryInterop project builds successfully. However, when I build the apps project itself, I get a bunch of errors related to the interfaces.
clang++ exited with code 1:
// a path
"OBJC_CLASS$_MauiFIRApp", referenced from:
// a path
error : Undefined symbols for architecture arm64:
How do I fix this?
Share Improve this question asked Mar 19 at 17:58 tonyedwardspztonyedwardspz 1,9202 gold badges25 silver badges49 bronze badges1 Answer
Reset to default 0Add the [Protocol]
attribute to each interface that is referenced in the "Undefined symbols for architecture arm64" errors.
From:
[BaseType (typeof(NSObject))]
interface MauiFIRApp
{
// Interface code
}
To:
[Protocol]
[BaseType (typeof(NSObject))]
interface MauiFIRApp
{
// Interface code
}
Then rebuild your NativeLibraryInterop project. If migrating between .Net versions / xcode versions, you might need to rebuild the native library as well
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744440161a4574310.html
评论列表(0条)