[Solved] How can I compile my app statically?



  • Hi,

    I have an App compiled normally (dinamically) in linux and I want to statically compile it once, to see the diference of the MB it needs but all I found is how to compile Qt statically. The question is, do I have to compile Qt statically to be able to compile my app statically or is there another way easier?

    I tried putting this line in the .pro but nothing changed: CONFIG+=static and CONFIG+=staticlib

    Thank you so much


  • Lifetime Qt Champion

    Hi,

    If you want a full static application then your must also compile all it's dependencies statically so yes you also have to built Qt statically. However depending on what part of Qt you are using, you can also just build the needed modules



  • @SGaist Ok, thank you so much!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.