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 link a Qt program?

Statically link a Qt program?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 151 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.
  • P Offline
    P Offline
    Publicnamer
    wrote on last edited by
    #1

    Is it possible to statically link a Qt application?

    I tried adding -Bstatic but that just gives errors:

    /usr/bin/ld: cannot find -lQt5Widgets
    /usr/bin/ld: cannot find -lQt5Gui
    /usr/bin/ld: cannot find -lQt5Core
    /usr/bin/ld: cannot find -lGL
    /usr/bin/ld: cannot find -lgcc_s
    /usr/bin/ld: cannot find -lgcc_s
    collect2: error: ld returned 1 exit status
    
    
    1 Reply Last reply
    0
    • AxelViennaA Offline
      AxelViennaA Offline
      AxelVienna
      wrote on last edited by
      #2

      You cannot link a Shared Library statically.
      To link Qt statically, you have to compile a static version for your OS.
      here is a detailed description how to do this.

      C++ and Python walk into a bar. C++ reuses the first glass.

      1 Reply Last reply
      2

      • Login

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