flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

Static linking of libjsoncpp

Open rekire opened this issue 3 years ago • 2 comments

When I start my flutter application on a fresh Ubuntu install (ubuntu-22.04.1-desktop-amd64) I get the error:

error while loading shared libraries: libjsoncpp.so.1: cannot open shared object file: No such file or directory

I found out that this comes from this dependency. Is there a way to static link this dependency so that I can escape the dependency hell?

Background is when I run this command:

myApp/lib$ ldd libflutter_secure_storage_linux_plugin.so | grep json libjsoncpp.so.1 => not found

The dependency is not found, if this would would be static linked into I would be able to run my app on linux with this flutter library.

rekire avatar Aug 17 '22 06:08 rekire

I was thinking of statically linking it as well. I don't remember what issues I ran into, but I decided to dynamically link it. If you have time, you should invest in opening a PR.

talhabalaj avatar Aug 21 '22 06:08 talhabalaj

To be honest, I was already checking if I could manage this, but I don't understand right now how static linking works in cmake files.

rekire avatar Aug 21 '22 06:08 rekire