我创建了一个Xamarin.Mac
应用,然后添加了nuget包Pkcs11Interop
(它支持mac)。并尝试调整项目但提供错误消息:
构建日志:
MMP : warning MM2006: Native library 'libdl' was referenced but could not be found.
/Library/Frameworks/Mono.framework/Commands/pkg-config --cflags mono-2
-D_THREAD_SAFE -I/Library/Frameworks/Xamarin.Mac.framework/Versions/4.0.0.216/lib/pkgconfig/../../include/mono-2.0
/Library/Frameworks/Mono.framework/Commands/pkg-config --variable=libdir mono-2
/Library/Frameworks/Xamarin.Mac.framework/Versions/4.0.0.216/lib/pkgconfig/../../lib
/Library/Frameworks/Mono.framework/Commands/pkg-config --modversion mono-2
5.4.0
xcrun -sdk macosx clang -g -mmacosx-version-min=10.12 -arch x86_64 -fobjc-runtime=macosx -Wno-unguarded-availability-new -ObjC -framework CoreFoundation -framework Security -framework CoreServices -framework AppKit -framework CoreVideo -framework Foundation -framework Carbon -framework OpenGL -framework CloudKit -framework QuartzCore -u xamarin_timezone_get_data -u xamarin_get_block_descriptor -u C_Initialize -u C_Finalize -u C_GetInfo -u C_GetFunctionList -u C_GetSlotList -u C_GetSlotInfo -u C_GetTokenInfo -u C_GetMechanismList -u C_GetMechanismInfo -u C_InitToken -u C_InitPIN -u C_SetPIN -u C_OpenSession -u C_CloseSession -u C_CloseAllSessions -u C_GetSessionInfo -u C_GetOperationState -u C_SetOperationState -u C_Login -u C_Logout -u C_CreateObject -u C_CopyObject -u C_DestroyObject -u C_GetObjectSize -u C_GetAttributeValue -u C_SetAttributeValue -u C_FindObjectsInit -u C_FindObjects -u C_FindObjectsFinal -u C_EncryptInit -u C_Encrypt -u C_EncryptUpdate -u C_EncryptFinal -u C_DecryptInit -u C_Decrypt -u C_DecryptUpdate -u C_DecryptFinal -u C_DigestInit -u C_Digest -u C_DigestUpdate -u C_DigestKey -u C_DigestFinal -u C_SignInit -u C_Sign -u C_SignUpdate -u C_SignFinal -u C_SignRecoverInit -u C_SignRecover -u C_VerifyInit -u C_Verify -u C_VerifyUpdate -u C_VerifyFinal -u C_VerifyRecoverInit -u C_VerifyRecover -u C_DigestEncryptUpdate -u C_DecryptDigestUpdate -u C_SignEncryptUpdate -u C_DecryptVerifyUpdate -u C_GenerateKey -u C_GenerateKeyPair -u C_WrapKey -u C_UnwrapKey -u C_DeriveKey -u C_SeedRandom -u C_GenerateRandom -u C_GetFunctionStatus -u C_CancelFunction -u C_WaitForSlotEvent -u mono_pmip -u xamarin_dyn_objc_msgSend -u xamarin_dyn_objc_msgSendSuper -u xamarin_dyn_objc_msgSend_stret -u _xamarin_dyn_objc_msgSendSuper_stret /Library/Frameworks/Xamarin.Mac.framework/Versions/4.0.0.216/lib/libxammac-debug.a -o /Users/fezz/Documents/Projects/IDReader/IDReader/bin/Debug/IDReader.app/Contents/MacOS/IDReader -D_THREAD_SAFE -I/Library/Frameworks/Xamarin.Mac.framework/Versions/4.0.0.216/lib/pkgconfig/../../include/mono-2.0 /Library/Frameworks/Xamarin.Mac.framework/Versions/4.0.0.216/lib/pkgconfig/../../lib/libmonosgen-2.0.a -liconv -x objective-c++ -I/Library/Frameworks/Xamarin.Mac.framework/Versions/4.0.0.216/include -fno-caret-diagnostics -fno-diagnostics-fixit-info -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk /Users/fezz/Documents/Projects/IDReader/IDReader/obj/x86/Debug/mmp-cache/main.m
Process exited with code 1, command:
Undefined symbols for architecture x86_64
答案 0 :(得分:0)
截至今天,Pkcs11Interop 4.0.0已经在Mac OS X上使用64位.NET Core和32位Mono运行时进行了测试。它支持Xamarin.Android和Xamarin.iOS,但它从未使用Xamarin.Mac进行过测试。我打开了issue for tracking the Xamarin.Mac support。