A
A
Alexander2015-07-19 04:20:52
Qt
Alexander, 2015-07-19 04:20:52

How to correctly build a Qt application with a dynamic library?

Good day.
There is a statically assembled library ( dll-file ). Sources, .a -file are also available. Now you need to use this library to write an application so that it does not pull the entire Qt framework with it, but uses what is in the library. You cannot statically link the application, because it turns out that the library weighs 18Mb and the application is exactly the same, I would like to separate the functionality of the library and the functionality of the application.
I tried to build the application with the Qt compiler out of the box with the included library, but when I start the application it immediately tries to find Qt5Core.dll.
Qt 5.5.0 (MinGW), Windows

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2015-07-19
@wxmaper

Understood. It turns out that everything is solved in two clicks: it was necessary to add __declspec (dllexport) to the source code of the library before the shared functions / classes.

J
Jacob E, 2015-07-19
@Zifix

That is, the library is built statically, but does it need to be linked dynamically? Why not build the library dynamically (throw out the ICU dependency) + windeployqt?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question