John Lotacs
John Lotacs

Reputation: 1254

First time Deploying Qt Application, dynamically link?

I'm starting to look into deploying a Qt application I've been developing but I've never had to deploy any C++ application before this.

I want to be able to ship my product as a pre-compiled executable that dynamically links against shared library files(Qt) for Linux/Windows so that there is an executable that looks in its own sub directories for libraries instead of libraries that may be installed as a result of other Qt products.

Is this something that is possible? Or must the Qt library files be installed separately for an application to link against them? I want to avoid requiring the end user to install ANYTHING on their systems while also avoiding static linking.

Upvotes: 3

Views: 4135

Answers (1)

Keith
Keith

Reputation: 225

This is a normal behavior for Qt. How to do it greatly depends on your build system.

If you use CMake, you can generate installers with CPack. Here is a link to adding the required shared libraries to an installer. CPack makes many different types of installers for Linux, Windows, and Mac OS X.

You can also generate your own installers using NSIS. This is a lot more involved but doable.

Qt has documentation on how to deploy applications that use their libraries.

At my company, we do both CPack and NSIS. The CPack way is a lot easier and there is more examples online.

Upvotes: 3

Related Questions