c# - Build native plugin for iOS using swig -
possibly related unmanaged c# calls static library https://stackoverflow.com/users/456434/mazyod
i'm trying build ios app using holotoolkit.sharing library (https://github.com/microsoft/mixedrealitytoolkit/tree/master/sharing) in turn based on several open source components including raknet.
after building library , dependencies static libraries arm64, , manually changing dll references __internal, able load plugin in ios app throws exception:
entrypointnotfoundexception: swigregisterexceptioncallbacks_sharingclient holotoolkit.sharing.sharingclientpinvoke+swigexceptionhelper..cctor () (at assets/holotoolkit/sharing/scripts/sdk/sharingclientpinvoke.cs:150)
the wrapper looks this:
[global::system.runtime.interopservices.dllimport ("__internal", entrypoint = "swigregisterexceptioncallbacks_sharingclient")] public static extern void swigregisterexceptioncallbacks_sharingclient ( exceptiondelegate applicationdelegate, exceptiondelegate arithmeticdelegate, exceptiondelegate dividebyzerodelegate, exceptiondelegate indexoutofrangedelegate, exceptiondelegate invalidcastdelegate, exceptiondelegate invalidoperationdelegate, exceptiondelegate iodelegate, exceptiondelegate nullreferencedelegate, exceptiondelegate outofmemorydelegate, exceptiondelegate overflowdelegate, exceptiondelegate systemexceptiondelegate);
as far can tell, necessary wrappers swig included in c++ project (found in clientwrapperapi_csharp.cpp):
#ifdef __cplusplus extern "c" #endif swigexport void swigstdcall swigregisterexceptioncallbacks_sharingclient( swig_csharpexceptioncallback_t applicationcallback, swig_csharpexceptioncallback_t arithmeticcallback, swig_csharpexceptioncallback_t dividebyzerocallback, swig_csharpexceptioncallback_t indexoutofrangecallback, swig_csharpexceptioncallback_t invalidcastcallback, swig_csharpexceptioncallback_t invalidoperationcallback, swig_csharpexceptioncallback_t iocallback, swig_csharpexceptioncallback_t nullreferencecallback, swig_csharpexceptioncallback_t outofmemorycallback, swig_csharpexceptioncallback_t overflowcallback, swig_csharpexceptioncallback_t systemcallback) { swig_csharp_exceptions[swig_csharpapplicationexception].callback = applicationcallback; swig_csharp_exceptions[swig_csharparithmeticexception].callback = arithmeticcallback; swig_csharp_exceptions[swig_csharpdividebyzeroexception].callback = dividebyzerocallback; swig_csharp_exceptions[swig_csharpindexoutofrangeexception].callback = indexoutofrangecallback; swig_csharp_exceptions[swig_csharpinvalidcastexception].callback = invalidcastcallback; swig_csharp_exceptions[swig_csharpinvalidoperationexception].callback = invalidoperationcallback; swig_csharp_exceptions[swig_csharpioexception].callback = iocallback; swig_csharp_exceptions[swig_csharpnullreferenceexception].callback = nullreferencecallback; swig_csharp_exceptions[swig_csharpoutofmemoryexception].callback = outofmemorycallback; swig_csharp_exceptions[swig_csharpoverflowexception].callback = overflowcallback; swig_csharp_exceptions[swig_csharpsystemexception].callback = systemcallback; }
building il2cpp , .net 2.0 subset, using -unsafe flag in unity 5.5.2f1 64-bit on mac os x 10.12, xcode 9.0 beta 2, ios 11 beta.
is there else need change __internal reference work? or, there's else needed wrapper find callback (i found old thread mentioning need build "helper dll": http://swig.10945.n7.nabble.com/c-wrapper-tries-to-find-swigregisterexceptioncallbacks-mydll-td6935.html)?
Comments
Post a Comment