vvilp
vvilp

Reputation: 423

Qt 5.1.0 has supported static compile ? How to?

From wiki we know “Support for static Qt builds making it possible to address those use cases that cannot use dynamic linking”

I have tired adding CONFIG += static , but not gonna work .

How to compile code staticaly without compile the whole qt project ?


before Qt5.1.0 we all can compile the code statically after build the qt project

but this time ,qt 5.1.0 wiki said new features include “Support for static Qt”

Upvotes: 1

Views: 813

Answers (2)

dgrat
dgrat

Reputation: 2244

As far as I know this was always possible with Qt?!

Upvotes: 0

dtech
dtech

Reputation: 49279

You need to do a static build of Qt before you can build statically linked applications with it. You have to specify -static when you configure it prior to building. None of the existing pre-built packages supports static linking out of the box.

Keep in mind there is a restriction - you cannot use static linking in commercial applications unless you have a commercial license. But it is ok for testing purposes and open source stuff.

Upvotes: 4

Related Questions