Important: Please read the Qt Code of Conduct -

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: => not found => not found => not found

    libicu-dev comes with .a versions of these libraries for static linking:


    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?

  • Qt Champions 2019

    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.

Log in to reply