# Android SDK: libGLESv2.so needed by libleiasdk.so not found

**URL:** <https://forums.leialoft.com/t/android-sdk-libglesv2-so-needed-by-libleiasdk-so-not-found/1303>\
**Category:** Legacy Native SDK\
**Created:** [August 19, 2021, 6:30pm UTC](https://forums.leialoft.com/t/android-sdk-libglesv2-so-needed-by-libleiasdk-so-not-found/1303 "2021-08-19T18:30:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakedowns](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.leialoft.com/jakedowns/32/606_2.png) [@jakedowns](https://forums.leialoft.com/u/jakedowns)\
**Post date:** [August 19, 2021, 6:30pm UTC](https://forums.leialoft.com/t/android-sdk-libglesv2-so-needed-by-libleiasdk-so-not-found/1303/1 "2021-08-19T18:30:47Z")

</div>

Hi There,

So, I’m a web-dev by trade, with limited Native App Development experience, dipping my toes into the world of CPP, Java, Native Android etc… so please forgive any lack of simple understanding on display here…

I’m trying to add libleiasdk.so to a fork of the Citra 3DS Emulator on Android, and I’m currently stuck with this error:  
`C:/Users/X/AppData/Local/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: warning: libGLESv2.so, needed by ../../../../../../../externals/leia_sdk/lib/arm64-v8a/libleiasdk.so, not found (try using -rpath or -rpath-link)`

My CMakeLists.txt looks like:

```auto
add_library(lib_leia_sdk STATIC IMPORTED)
set_target_properties(lib_leia_sdk PROPERTIES IMPORTED_LOCATION
            ${PROJECT_SOURCE_DIR}/externals/leia_sdk/lib/arm64-v8a/libleiasdk.so)
target_include_directories(video_core PRIVATE
            ${PROJECT_SOURCE_DIR}/externals/leia_sdk/include)
target_link_libraries(video_core PRIVATE EGL GLESv3 lib_leia_sdk)

```

The project itself uses GLAD, which I’m not familiar with, but, it seems to utilize EGL/GLES already?  
However, even if I explicitly include:

```auto
#include <EGL/egl.h>
#include <GLES/gl.h>

```

I still get the same error.

I’ve detailed further information about the context of the issue here:

> <https://github.com/citra-emu/citra-android/issues/241>
>
> Hello again. I'm continuing to make progress on my test of adding the LeiaNative…SDK support on my fork here:
> https://github.com/jakedowns/citra-android/commit/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79
> 
> I've run into an error tho: 
> \`\`\`
> C:/Users/X/AppData/Local/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/windows-x86\_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\\ld: warning: libGLESv2.so, needed by ../../../../../../../externals/leia\_sdk/lib/arm64-v8a/libleiasdk.so, not found (try using -rpath or -rpath-link)
> \`\`\`
> 
> In the Leia SDK Example, they have you link \`EGL\` and \`GLESv3\`, as seen here: https://github.com/jakedowns/LeiaLoft\_NativeAndroid\_SDK/blob/5c161b3c9c3ce1d9fb0287b7ba0880c9859eb310/Samples/TeapotsWithLeia/more-teapots/src/main/cpp/CMakeLists.txt#L59 
> 
> I noticed in the Citra-Android repo, in the AndroidNdkModules.cmake file, you have a similar library linking going on, only it's \`EGL & GLESv2\`
> https://github.com/jakedowns/citra-android/blob/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79/CMakeModules/AndroidNdkModules.cmake#L54
> 
> I would assume, that this would be enough for libleiasdk.so to be able to load libGLESv2.so as-needed? but it appears not?
> 
> For good measure, I tried including GLESv3 in the video\_core \> CMakeLists file here: https://github.com/jakedowns/citra-android/blob/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79/src/video\_core/CMakeLists.txt#L164
> 
> and, in \`video\_core/renderer\_opengl/renderer\_opengl.cpp\` I attempted to include
> \`\`\`
> \#include \<EGL/egl.h\>
> \#include \<GLES/gl.h\>
> \`\`\`
> https://github.com/jakedowns/citra-android/blob/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79/src/video\_core/renderer\_opengl/renderer\_opengl.cpp#L15
> 
> still, to no avail. (wasn't sure if it only needed to be included in the .cpp file or also the .h file?)
> 
> Anyway, I could go on and on, but hopefully this is enough info that you could hopefully point me in the right direction. I'm happy to provide any more info that may be helpful. I'm also reaching out to Leia support to see if it's something they have advice for.
> 
> Thank you

My code can be found here:  
[https://github.com/jakedowns/citra-android/commit/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79](https://github.com/jakedowns/citra-android/commit/2e42a6d26e18ba61beaebc0fb9fa2126a061dc79)

I’m happy to provide any more info that may be helpful in diagnosing/resolving this error.  
Thanks in advance for your attention.

---

<div class="post-metadata">

**Author:** ![jakedowns](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.leialoft.com/jakedowns/32/606_2.png) [@jakedowns](https://forums.leialoft.com/u/jakedowns)\
**Post date:** [August 19, 2021, 10:37pm UTC](https://forums.leialoft.com/t/android-sdk-libglesv2-so-needed-by-libleiasdk-so-not-found/1303/2 "2021-08-19T22:37:04Z")

</div>

i figured it out, i needed to change GLESv3 to GLESv2

---

<div class="post-metadata">

**Author:** ![Johannes\_Hainer](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.leialoft.com/johannes_hainer/32/538_2.png) [@Johannes\_Hainer](https://forums.leialoft.com/u/Johannes_Hainer)\
**Post date:** [August 20, 2021, 6:19pm UTC](https://forums.leialoft.com/t/android-sdk-libglesv2-so-needed-by-libleiasdk-so-not-found/1303/3 "2021-08-20T18:19:58Z")

</div>

Awesome! Will Your Citra Build be for Download as compiled apk in Your GitHub?

---

<div class="post-metadata">

**Author:** ![jakedowns](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.leialoft.com/jakedowns/32/606_2.png) [@jakedowns](https://forums.leialoft.com/u/jakedowns)\
**Post date:** [August 20, 2021, 7:53pm UTC](https://forums.leialoft.com/t/android-sdk-libglesv2-so-needed-by-libleiasdk-so-not-found/1303/4 "2021-08-20T19:53:57Z")

</div>

Here you go! let me know what you think:

> **[Release Beta 15.1 · jakedowns/citra-android](https://github.com/jakedowns/citra-android/releases/tag/beta-15.1)**
>
> This is an early experimental build of Citra-Android with support for Leia Inc's Lume Pad featuring a LitByLeia display
> The display of the LumePad supports 4 independent views, but for now, I'm sim...

---

<div class="post-metadata">

**Author:** ![Johannes\_Hainer](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.leialoft.com/johannes_hainer/32/538_2.png) [@Johannes\_Hainer](https://forums.leialoft.com/u/Johannes_Hainer)\
**Post date:** [August 20, 2021, 8:27pm UTC](https://forums.leialoft.com/t/android-sdk-libglesv2-so-needed-by-libleiasdk-so-not-found/1303/5 "2021-08-20T20:27:48Z")

</div>

Awesome! I’ll take a Look in the next few days, Thank You very mouch!

---

<div class="post-metadata">

**Author:** ![Johannes\_Hainer](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.leialoft.com/johannes_hainer/32/538_2.png) [@Johannes\_Hainer](https://forums.leialoft.com/u/Johannes_Hainer)\
**Post date:** [December 8, 2021, 9:52pm UTC](https://forums.leialoft.com/t/android-sdk-libglesv2-so-needed-by-libleiasdk-so-not-found/1303/6 "2021-12-08T21:52:55Z")

</div>

Revisited Your latest Beta and I am impressed! Do You think there is room for improvement or more specific for a few more frames per Second on certain Games? By the way Zelda Runs pretty good!
