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. Completely Statically Built Application
QtWS25 Last Chance

Completely Statically Built Application

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.2k 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.
  • G Offline
    G Offline
    Geometrian
    wrote on last edited by
    #1

    Hi,

    I would like to write an application that is completely statically built using Qt 5.0.

    In the past, I have been successful in making applications that require shared objects to be distributed with the application (in a specially named folder, egad). My goal is to make one that requires none. Absolutely none. No installing to any system directories, no runtime additions to the path, no shared libraries. None. I should be able to move the executable binary around freely.

    First: is this possible with Qt 5.0?
    Second: if so, how?

    Thanks,

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      It is.

      You need to compile Qt5 statically, and then compile your app statically too. AFAIK, there are some hurdles in doing that currently in Qt5. Qt4 should be easier.

      (Z(:^

      1 Reply Last reply
      0
      • U Offline
        U Offline
        utcenter
        wrote on last edited by
        #3

        I had no problems with building 5.0.1 statically, but QML applications don't show any output, may have something to do with enabling desktop Opengl.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbnoimi
          wrote on last edited by
          #4

          [quote author="Geometrian" date="1366725933"]Hi,

          I would like to write an application that is completely statically built using Qt 5.0.

          In the past, I have been successful in making applications that require shared objects to be distributed with the application (in a specially named folder, egad). My goal is to make one that requires none. Absolutely none. No installing to any system directories, no runtime additions to the path, no shared libraries. None. I should be able to move the executable binary around freely.

          First: is this possible with Qt 5.0?[/quote]

          Sure... you can.

          [quote author="Geometrian" date="1366725933"]Second: if so, how?[/quote]

          Recompile Qt source code with static option ... I did that in Linux as following:

          [code]./configure -opensource -static -developer-build -v -qt-sql-psql -qt-sql-sqlite -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -qt-xcb[/code]

          For more information... https://qt-project.org/doc/qt-5.0/qtdoc/deployment-x11.html#static-linking

          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