Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Statically compiling ICU on Linux?
Forum Update on Monday, May 27th 2025

Statically compiling ICU on Linux?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ScottLupton
    wrote on last edited by aha_1980
    #1

    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?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      you have to compile Qt with those static libs, not your app...

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      4
      • S Offline
        S Offline
        ScottLupton
        wrote on last edited by ScottLupton
        #3

        I've rebuilt Qt with the three ICU libraries and that seems to have solved the problem.

        Thanks for the help.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved