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. Application size
Forum Updated to NodeBB v4.3 + New Features

Application size

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

    I built Qt 5.11.2 on Win 10 statically using MinGW 5.3.0 32bit with default configuration (i just set opengl to dynamic).

    Now, with blank (no code in) main() my binary has 15 kB in size.

    If I add any Qt code to my blank main, e.g.:

    if(QDir("AAA").exists()) {
        return 2;
    }
    

    my binary has almost 5 MB size. Does linker just link complete QtCore to my binary, even though only small subset is really used in my app?

    Is it possible to lower the size of my app?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi
      5 MB sounds pretty ok. it uses more than one should think
      as there is also signals and slots etc.
      You can use exe packer
      https://upx.github.io/
      which normally makes the deployment file pretty small.

      1 Reply Last reply
      3

      • Login

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