I am trying to use the iOS version of ORB_SLAM2 (GitHub - ygx2011/ORB_SLAM2-IOS: ORB_SLAM2 for iOS.) as a plugin to a Unity (Unity 5.5) project. To be able to use this as a plugin, I created a static library (.a file placed in Assets/Plugins/iOS/ directory) from the above iOS app, that can be used to subclass the UnityAppController.
Now, in the Unity player settings, I changed the scripting backend to IL2CPP and the architecture to arm64. The reason I did this is because according to the Unity 5.5 Legacy documentation, IL2CPP is the only scripting backend to support deploying to ARM 64-bit on iOS.
When I build and run the generated Xcode project, I get the following errors with regards to arm64 architecture.
I’m a beginner in both Unity & iOS and any help would be really appreciated. I use Unity 5.5.2f1, Xcode 9 beta 3 and an iPhone 7 Plus with iOS 11 beta 4 for my project.
P.S. The ORB_SLAM2-IOS works fine if compiled directly as an iOS app. The problem occurs only when I try to use it as a static library.
It looks like you might be missing another static library that ORB_SLAM2 needs. Maybe it is the opencv2.framework (you can try adding that in Xcode), but I’m not sure.
I’m not sure then. Maybe it is worth checking the differences between the Xcode project where ORB_SLAM2 works by itself, and the one that Unity generates.