Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by vivekarvind007 · Aug 01, 2017 at 08:14 AM · iospluginplugins64bitarm

arm64 architecture issue with unity and iOS 11

Hello everyone,

I am trying to use the iOS version of ORB_SLAM2 (https://github.com/ygx2011/ORB_SLAM2-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.

Undefined symbols for architecture arm64:

"cv::String::deallocate()", referenced from: cv::String::~String() in libORBSlamLib.a(ORBSlamLib.o) cv::String:: Operator=(cv::String const&) in libORBSlamLib.a(ORBSlamLib.o)

"cv::error(int, cv::String const&, char const*, char const*, int)", referenced from: cv::Mat: Operator cv::Vec() const in libORBSlamLib.a(ORBSlamLib.o) cv::Mat::Mat(int, int, int, void*, unsigned long) in libORBSlamLib.a(ORBSlamLib.o)

"cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)", referenced from cv::Mat::colRange(int, int) const in libORBSlamLib.a(ORBSlamLib.o) cv::Mat::rowRange(int, int) const in libORBSlamLib.a(ORBSlamLib.o) cv::Mat::col(int) const in libORBSlamLib.a(ORBSlamLib.o)

"ORB_SLAM2::System::TrackMonocular(cv::Mat const&, double const&)", referenced from: -[ORBSlamLib libProcessImage:] in libORBSlamLib.a(ORBSlamLib.o)

"cv: ProjectPoints(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, double)", referenced from: -[ORBSlamLib libProcessImage:] in libORBSlamLib.a(ORBSlamLib.o)

"cv::circle(cv::InputOutputArray const&, cv: Point, int, cv::Scalar_ const&, int, int, int)", referenced from: -[ORBSlamLib libProcessImage:] in libORBSlamLib.a(ORBSlamLib.o)

"_inverse", referenced from: _LLIMUPosMgr_inverse_m3594686272 in Bulk_Assembly-CSharp_3.o _LLIMUPosMgr_KFUpdate_m728291423 in Bulk_Assembly-CSharp_3.o

"cv::noArray()", referenced from: -[ORBSlamLib libProcessImage:] in libORBSlamLib.a(ORBSlamLib.o)

"_multiply", referenced from: _LLIMUPosMgr_multiply_m1606521480 in Bulk_Assembly-CSharp_3.o _LLIMUPosMgr_KFPredict_m2919581928 in Bulk_Assembly-CSharp_3.o _LLIMUPosMgr_KFUpdate_m728291423 in Bulk_Assembly-CSharp_3.o

"_subtract", referenced from: _LLIMUPosMgr_subtract_m949145514 in Bulk_Assembly-CSharp_3.o _LLIMUPosMgr_KFUpdate_m728291423 in Bulk_Assembly-CSharp_3.o

"cv::Rodrigues(cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&)", referenced from: -[ORBSlamLib libProcessImage:] in libORBSlamLib.a(ORBSlamLib.o)

"cv::fastFree(void*)", referenced from: _mGetPose in SlamAppController.o cv::Mat::~Mat() in libORBSlamLib.a(ORBSlamLib.o)

"_add", referenced from: _LLIMUPosMgr_add_m3985982311 in Bulk_Assembly-CSharp_3.o

I noticed that most of these errors occurs in opencv functions, so I cross checked if the opencv2.framework included in the project is built with arm64 support. But from the opencv forums it's mentioned the latest version of opencv does support arm64 (I cloned the opencv GitHub repository and followed these instructions on the opencv documentation to generate the framework). I've already played around with the commonly recommended solutions from posts like https://stackoverflow.com/questions...ibrary-architecture-for-suporting-arm64-build , http://answers.unity3d.com/questions/912000/apple-mach-o-linker-error-when-building.html, https://stackoverflow.com/questions/6429494/undefined-symbols-for-architecture-armv7, etc. From the forums I've come across, the following build settings have worked for others.

Architectures - Standard ARCHS.

Build Active Architecture Only - Debug set to YES; Release set to NO.

Supported Platforms - iphoneos

Valid Architectures - arm64 armv7 armv7s

Framework Search Paths - $(PROJECT_DIR) where the opencv2.framework is located.

C++ Language Dialect - GNU++11 (couldn't set this to C++11 since GNU++11 is required by another framework called GLKit - could this be the problem? Is there a workaround for this?)

C++ Standard Library - libc++ LLVM C++ Standard Library with C++11 support.

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. Thanks!
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by rahul_noob · Oct 03, 2017 at 12:50 PM

Hi,@vivekarvind007

Go to iOS Player Settings, -> Click the 'Other Settings',-> make sure in the configuration scripting backend is set to 'IL2CPP' (not 'Mono2x'). then Scroll down to 'Architecture' (above 'Scripting Define Symbols') and set the 'Architecture' to 'Universal'.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image clintomed · Jul 21, 2018 at 02:03 AM 0
Share

Also make sure it's not on Simulator SD$$anonymous$$

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

92 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Did anyone built the Alembic Importer for Android and iOS? 0 Answers

iOS Launch Options 0 Answers

Have to "Replace" iOS project every build because of Linker Errors 0 Answers

Integrate Admob in iOS and windows phone 0 Answers

Native RenderPlugin not working for iOS 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges