How do I create a shared library in C++ for both Android and iOS?

Viewed 7168

I am using LibGDX to write apps for both Android and iOS and I want to be able to add C++ code to my apps to optimize certain parts and to port some functions etc.

I have been searching the internet and tried to follow some tutorials, but did not find what I need.

How can I write a very basic C++ library which I can load in LibGDX? Which tools do I need to use? Visual Studio? I develop in Android Studio.

I think that I need an .so file for Android and an .a file for iOS, is that correct?

1 Answers
Related