1
\$\begingroup\$

I've been working on a project of mine(a game with SDL3 + OpenGL ES 3.2), and as of right now I want to port it to android with android NDK, I compile my game as a library(compiles and links correctly, inside and outside of android studio), but when I launch my application on an emulator it prints:

SDL Error:

dlopen failed:library "libimage-engine.so" is not found

I specify my libraries in the getLibaries method:

protected String[] getLibraries() {
        return new String[] {
                "c++_shared",
            "SDL3",
            "image-engine",
                "image"
        };
    }

enter image description here

Update the library is located in android-project/app/build/intermediates/cmake/debug/obj/x86_64

I think the issue is with the fact that its a debug version and not a release one

Update 2 I noticed I forgot to add a library which loads the images(stb_image), one oddity that I have noticed is that the libloader(a separate shared library) is found. I also analyzed it with apk analyzer and all the libraries are in the apk.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

The mistake was in a typo, the method getLibraries() takes in image-engine, while the library is built as image_engine. If you have a better way of parsing libraries, please provide it in the comments or answers.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .