Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
embed qt dlls in exe
i'm building a small application using visual studio.
however, i need to provide
is there a way to embed (make a part of) the libs (
Qt5Core.lib, etc.) into the executable?
Yes its called static linking but it requires a commercial license unless you app is
i have the license
Super, then you just need to build a static version of Qt and compile app with it.
user4592357 last edited by user4592357
actually i only have the installer of qt, but also the libs from the installation. can't i do it using those?
well you need to get the source code of Qt.
The installer has option for that.
You might need to install some extra stuff.
I found these helpful with visual studio
No, the version you can download is for dynamic loading only.
You can only do static if the Qt version is made for that.
Make sure to use all cores of your pc as else it takes long time to compile :)
i built static version of qt using the instructions from here: Build Qt 5.7 Statically Using MSVC.
i also setup the kit in qt creator as described in the article. now when i try to build the app, this is what i get:
17:45:08: Running steps for project untitled... 17:45:08: Starting: "C:\Qt\Static\5.10.1\bin\qmake.exe" C:\Users\user\Documents\untitled\untitled.pro -spec win32-msvc "CONFIG+=qml_debug" Could not find qmake configuration file win32-msvc. Error processing project file: C:\Users\user\Documents\untitled\untitled.pro 17:45:08: The process "C:\Qt\Static\5.10.1\bin\qmake.exe" exited with code 3. Error while building/deploying project untitled (kit: Qt 5.10.1 Static) The kit Qt 5.10.1 Static has configuration issues which might be the root cause for this problem. When executing step "qmake" 17:45:08: Elapsed time: 00:00.
and its just a new test project ?
and you do in fact have the win32-msvc file/folder?