Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Costimizing statically built binary
Forum Updated to NodeBB v4.3 + New Features

Costimizing statically built binary

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 3 Posters 3.2k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    C00l
    wrote on last edited by
    #1

    I am created a project on Ubuntu 10.04 using Qt 4.7.4 . My executable should be portable across Linux machines so I made it as statically built.

    I have followed below mentioned url instructions for statical build.

    http://www.qtcentre.org/wiki/index.php?title=Building_static_applications

    Q1) With out configuring and compiling the source code dose Qt creator have any option for static build?

    After making statically built my executable appears to be 14MB.

    Q2) Is there any way to optimize statically build executable size ?

    Any idea how to optimize size?

    Thanks,

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hostel
      wrote on last edited by
      #2

      I think that I have an answer for question 2. In linux is a command:
      @
      strip
      @
      Execute this program on your executable:
      @
      strip qt_program.out
      @
      Check size. Read of course strip's manual.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        Regarding Q1: Qt Creator dose not provide these means, but qmake does. You will have to rebuild Qt manually for static linking though. The option is set during the ./configure run, there's nothing Creator can help you here.

        Make sure to check the licensing issues with static building, though.

        http://www.catb.org/~esr/faqs/smart-questions.html

        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