- Home /
Can an IL2CPP android build include static libraries?
Our project is facing issues of this kind: http://issuetracker.unity3d.com/issues/android-slash-il2cpp-shared-library-on-il2cpp-built-apk-does-not-load-and-causes-dllnotfoundexception
However, while not having access to the source code of the 3rd-party lib which we wish to use, we do have a static version of it.
It appears that .so files inside Plugin/Android are magically copied to the appropriate place in the final apk, but dropping a .a file there does not mean it is included in the link command generating il2cpp.so.
Is there, by any chance, a way to let Unity know about static libraries to be linked against?
Answer by Yury-Habets · Nov 27, 2015 at 11:03 AM
We don't support static libraries, at least at the moment.
Your bug with "dll not found" was fixed, and is planned to get into 5.2 patch release as well.
With the latest Unity 5.4 where il2cpp android goes official, does this impediment remains? I mean, unable to link to a static lib?
Thanks
No static libs are not supported for Android IL2CPP at the moment.
Why would you want to use it?
Anyway - if you have a static lib that you want to make use, it's easy to link it into a .so and use it as a native plugin.
It would greatly help with hacking, for example we use S$$anonymous$$mworks via a DLL which can simply be replaced with a hacked copy. If this code was statically linked into the exe it would make it harder for our game to cracked.
Your answer
Follow this Question
Related Questions
Memory usage in Profiler much less than on actual device 1 Answer
Native plugin JNI_OnLoad/UnitySetGraphicsDevice not called when using IL2CPP on Android 0 Answers
Why IL2CPP increases ANR percent ? 1 Answer
Failed to compress IL2CPP symbol files in android build 0 Answers
Export failed with Il2cpp on Android 1 Answer