Link shared library without use soversion

Hi,

I am trying to build an android application using QT and QML. The problem is that Android does not support soversion libraries (.s0.X), in the .apk package i can only include .so files.

My Cmake project create a link against libfreeimage.so.3, at runtime the application breaks

java.lang.UnsatisfiedLinkError: dlopen failed: library “libfreeimage.so.3” not found

My CMakeLists.txt is:

target_link_libraries(neptuno Qt5::Sql Qt5::Quick Qt5::Qml Qt5::Network Qt5::NetworkAuth Qt5::Widgets
        /home/gabridc/Repositorio/neptuno-forked/App/Libraries/FreeImage/armeabi-v7a/libfreeimage.so)

If i were able to link against libfreeimage.so I think my problem will be solved.

Thank you in advance

The name put into the linking library for how to use a library comes from its DT_SONAME entry, not its filename on disk. You’ll need to recompile freetype to compile without a soname for generality. You can also try using patchelf --set-soname libfreetype.so to make that the filename that is looked for at runtime.

Thank you so much !! I will try to recompile the library and link.