Statically compiling ICU on Linux?
-
I wanted to statically link libicu on Linux because it causes a lot of dependency problems. The expected libraries are:
libicui18n.so.55 => not found libicuuc.so.55 => not found libicudata.so.55 => not found
libicu-dev comes with .a versions of these libraries for static linking:
/usr/lib/x86_64-linux-gnu/libicui18n.a /usr/lib/x86_64-linux-gnu/libicuuc.a /usr/lib/x86_64-linux-gnu/libicudata.a
I copied these files to a libicu folder in my development directory and then added these lines to my .pro file:
LIBS += ../libicu/libicui18n.a ../libicu/libicuuc.a ../libicu/libicudata.a PRE_TARGETDEPS += "../libicu/libicui18n.a" "../libicu/libicuuc.a" "../libicu/libicudata.a"
Unfortunately, this doesn't work, and ldd shows that the resulting binary is still looking for libicu on the system.
How can I statically link libicu on Linux?
-
you have to compile Qt with those static libs, not your app...
-
I've rebuilt Qt with the three ICU libraries and that seems to have solved the problem.
Thanks for the help.