We encountered an issue when trying to build Xamarin iOS application on .Net6 framework with the following errors (the log is redacted for the sake of bravity):
Undefined symbols for architecture arm64:
...
ld: warning: arm64 function not 4-byte aligned: _vgray_from_alpha from /Users/user/Documents/App/obj/Debug/net6.0-ios/ios-arm64/linker-cache/libPDF_iOS.a(RDEXT64.o)
ld: warning: arm64 function not 4-byte aligned: _vrgba_from_pals from /Users/user/Documents/App/obj/Debug/net6.0-ios/ios-arm64/linker-cache/libPDF_iOS.a(RDEXT64.o)
ld: warning: arm64 function not 4-byte aligned: vrgba_from_pals_8 from /Users/user/Documents/App/obj/Debug/net6.0-ios/ios-arm64/linker-cache/libPDF_iOS.a(RDEXT64.o)
"_BIO_ctrl", referenced from:
RDCert_decrypt(_RDCERT_DATA*, unsigned char*, unsigned char const*, int) in libPDF_iOS.a(RDCrypto.o)
"_BIO_free", referenced from:
RDBIO_free(_RDBIO*) in libPDF_iOS.a(RDCrypto.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And it would be nice if someone could help someway and point on source of error.
Here is a little bit details of our PDF library usage. We make our static library libPDF_iOS.a with some modification which serves our needs (and it use libRDPDFLib.a of course). Then we make Xamarin binding library, add it in application project... The described usage schema works just fine while we build our application with Xamarin.iOS. But now time comes to migrate from Xamarin to Net6 framework and Maui. We migrate projects of our application to SDK format. Rebuild binding library for target net6.0-ios. And when we build application for ios-arm64 we got the errors "Undefined symbols for architecture arm64".
I have tried to play with linking options in NET project (on and off, exclude particular dll from linking) but have no success.
Need any assistance to address this issue.