Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 BTamas · Nov 14, 2012 at 10:46 AM · androidiosdllcrossplatform

Cross platform dlls (ios,android,pc)

I would like to build some library code into cross platform (pc,android,ios) dlls. On android and pc it works, on iOS it fails to build:

 Cross compilation job myDll.dll failed.
 UnityEngine.UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,nimt-trampolines=512,static,outfile="myDll.dll.s" "myDll.dll"  current dir : /Developer-old/Test/Repositories/Project/Temp/StagingArea/Data/Managed
  result file exists: False
 stdout:
 stderr:
 
   at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultingFile) [0x00000] in <filename unknown>:0
   at UnityEditor.MonoCrossCompile.CrossCompileAOT (BuildTarget target, System.String crossCompilerAbsolutePath, System.String assembliesAbsoluteDirectory, CrossCompileOptions crossCompileOptions, System.String input, System.String output, System.String additionalOptions) [0x00000] in <filename unknown>:0
   at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in <filename unknown>:0
 UnityEditor.MonoCrossCompile:CrossCompileAOTDirectoryParallel(BuildTarget, CrossCompileOptions, String, String, String)
 PostProcessiPhonePlayer:PostProcess(BuildTarget, String, String, String, String, String, String, String, BuildOptions, RuntimeClassRegistry)
 UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

I have some code like this in the dll:

 #if UNITY_ANDROID && !UNITY_EDITOR
     DoStuff();
 #endif

Could it be that the iOS build fails because of these platform specific parts? The dll would contain only android specific code, but it would be annoying if we had to delete it every time we wanted to build the project for ios. Any ideas how to fix this?

Comment
Add comment · Show 2
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 Montraydavis · Nov 14, 2012 at 03:43 PM 0
Share

iOS does not read .dll files.

avatar image BTamas · Dec 06, 2012 at 12:07 PM 0
Share

So why does it fail? Is this a unity bug?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Graham-Dunnett · Dec 06, 2012 at 03:45 PM

No, it's not a Unity bug. For iOS all game script code has to be converted into Arm assembler. We do this by compiling the script code. My guess is that your DLL only contains byte code.

Comment
Add comment · Show 3 · 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 BTamas · Dec 11, 2012 at 10:05 AM 0
Share

"$$anonymous$$y guess is that your DLL only contains byte code."

What does that even mean?

Here is a library that causes us trouble: https://launchpad.net/nunitlite

avatar image texdata · Nov 29, 2014 at 02:29 PM 0
Share

finding a dll that causes this error can be trouble, is there a way to analyse this somehow ?

avatar image DeveshPandey · Feb 17, 2015 at 06:34 PM 0
Share

how can I fix this issue, I want to call IOS native functions and Android native functions from a DLL, how can I achieve this?

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

12 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

Related Questions

Local Account System On Mobile Devices 0 Answers

Can I build Unity Android and iOS plugins as DLLs? as in compile all the .jars, .mm and the .cs together as 1 DLL? 0 Answers

Targeting multiple OS 1 Answer

Cross platform multiplayer 3 Answers

Database integration for iOS and Android in Unity3d 1 Answer


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