Hello,
Welcome to our Microsoft Q&A platform!
I want compiling shared library for Android and iOS to static library *.a, for Android for four arch (arm64-v8a, armebi-v7, a, x86, x86_64) and iOS(armv7, armv7s, arm64, i386, x86_64). Why do I need it?
Different Android devices use different CPUs, which in turn support different instruction sets. Each combination of CPU and instruction set has its own Application Binary Interface (ABI). An ABI includes the following information:
- The CPU instruction set (and extensions) that can be used.
- The endianness of memory stores and loads at runtime. Android is always little-endian.
- Conventions for passing data between applications and the system, including alignment constraints, and how the system uses the stack and registers when it calls functions.
- The format of executable binaries, such as programs and shared libraries, and the types of content they support. Android always uses ELF. For more information, see ELF System V Application Binary Interface.
- How C++ names are mangled. For more information, see Generic/Itanium C++ ABI.
For more details, you can check: https://developer.android.com/ndk/guides/abis
Update:
You can create library by using visual studio. The steps are : clicke on New project ->seletc Class Library in your visual studio.
For this, you can check the offical document :
Walkthrough: Create and use a static library
and
Walkthrough: Create and use your own Dynamic Link Library (C++)
Best Regards,
Jessie Zhang
---
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.