# How to call a function from .so lib on android?

**URL:** <https://forums.unrealengine.com/t/how-to-call-a-function-from-so-lib-on-android/75427>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [October 7, 2016, 11:00am UTC](https://forums.unrealengine.com/t/how-to-call-a-function-from-so-lib-on-android/75427 "2016-10-07T11:00:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syntopia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Syntopia](https://forums.unrealengine.com/u/Syntopia)\
**Post date:** [October 7, 2016, 11:00am UTC](https://forums.unrealengine.com/t/how-to-call-a-function-from-so-lib-on-android/75427/1 "2016-10-07T11:00:28Z")

</div>

Community greetings,

I need OpenSSL functionality on android. Theoretically assemble .so lib and add it to the project, I know how, but how to call a function from a .so from UE app I can not imagine. I am familiar with android development and a little with NDK. Can I call OpenSSL functionality and not load library in java, but directly cpp from cpp ?

Need a roadmap!  
Thanks!

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [October 7, 2016, 6:00pm UTC](https://forums.unrealengine.com/t/how-to-call-a-function-from-so-lib-on-android/75427/2 "2016-10-07T18:00:25Z")

</div>

OpenSSL is compiled into libcurl.a for Android. You can just call the functions in libcrypto and libssl since they are linked in.

---

<div class="post-metadata">

**Author:** ![Syntopia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Syntopia](https://forums.unrealengine.com/u/Syntopia)\
**Post date:** [October 9, 2016, 7:35pm UTC](https://forums.unrealengine.com/t/how-to-call-a-function-from-so-lib-on-android/75427/3 "2016-10-09T19:35:38Z")

</div>

Created the wiki article how to add a shared library(.so) to android by the example of openssl.  
Many thanks to Chris Babcock for the info.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_15cad3d6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_15cad3d6](https://forums.unrealengine.com/u/anonymous_user_15cad3d6)\
**Post date:** [October 10, 2016, 9:53am UTC](https://forums.unrealengine.com/t/how-to-call-a-function-from-so-lib-on-android/75427/4 "2016-10-10T09:53:14Z")

</div>

Could you please provide some more details…

Where did you stored/generated it ?

Generally when you generated shared library from NDK it will be stored

$(NDKROOT)/apps/\<MY Project\>/projects/libs/armeabi/libxxx.so

U can link this using ‘LOCAL\_LDLIBS :=’ with complete path.
