Does Qt creator by default statically or dynamically link it's libraries?

I'm developing a closed source application and to do so in accordance with the LGPL I have to dynamically link Qt's libraries to my application. Does Qt do this by default or do I have to take steps to do so? If that's the case how would I go about doing it?

Answers


Qt uses dynamic linking by default.

You'll notice this immediately during deployment to a non-developer machine, because your code will not run without the Qt libraries.

If your concern is the LGPL, just be careful when compiling Qt itself. Most LGPL violations with Qt are not because of static linking (since dynamic is the default), but for compiling Qt with non-default parameters.

LGPL is not just that the library must be provided along your binaries, but also that you specify how your users can build themselves the LGPL part. If you compile Qt yourself and do not use the pre-compiled binaries from the website, you must document that part of your build configuration in your release!

As soon as you get something running on your program, start preparing a release version for a non-developer environment without Qt installed. Your program should fail as soon as you delete the DLLs that you must copy along your program (or whatever format your OS uses).


It does it by default, statically linking seems to be quite involved judging by the many questions on the site regarding it.


Need Your Help

How much faster is implicit expansion compared with bsxfun?

arrays matlab performance bsxfun

As commented by Steve Eddins, implicit expansion (introduced in Matlab R2016b) is faster than bsxfun for small array sizes, and has similar speed for large arrays:

Getting an Facebook user profile data with Javascript

javascript facebook

I need to get a facebook user uid , gender, photo and other profile data with Javascript.