Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. static build
    Log in to post

    • UNSOLVED Static Windows 10 build with 5.15.5
      General and Desktop • static build 5.15 idl • • JRoperMedtronic  

      1
      0
      Votes
      1
      Posts
      89
      Views

      No one has replied

    • UNSOLVED Build qtcreator using static linking
      Installation and Deployment • qtcreator static build • • alexey.ismagilov  

      1
      0
      Votes
      1
      Posts
      161
      Views

      No one has replied

    • UNSOLVED Compile using static Qt build with QtCreator - not using static OS libraries
      Tools • qtcreator static build os libraries • • montanaviking  

      7
      0
      Votes
      7
      Posts
      505
      Views

      Thanks, I am distributing my source code via GitHub and GPL. I think that so long as I do that, it doesn't matter whether or not I use static linking in so far as licensing is concerned. My code is open-source, at least that's my intent. I did find that I was able to easily modify the makefile emitted by Qt Creator to force static linking of most, but not all of the Linux system dependencies. Apparently, some of the OS libraries were available only as shared libraries and in some cases Qt libraries called shared Linux OS libraries so that I was not able to use all the available static libraries offered by Linux. Too bad that it doesn't appear that one can roll up a desktop app all into one executable with no shared library calls. I'm thinking this would be nice since then, it could be distributed to any Linux machine without consideration of the distribution or kernel version? Thanks, Phil
    • UNSOLVED Undef. ref. __emutls on Qt 5.15.1 static Windows
      General and Desktop • static build • • MikePooh  

      1
      0
      Votes
      1
      Posts
      119
      Views

      No one has replied

    • UNSOLVED Undefined references in Qt5.14.0 static using CMake (mingw) in Windows
      General and Desktop • static build • • MNB_1101  

      5
      0
      Votes
      5
      Posts
      947
      Views

      I searched for this problem a lot and found the problem in the link below, which is related to a bug in version Qt5.14.0 that has been fixed in higher versions. I tested with version Qt5.14.2 and it was compiled without error. https://stackoverflow.com/questions/41765673/static-linking-against-qt-on-windows-using-cmake https://codereview.qt-project.org/c/qt/qtbase/+/282408
    • UNSOLVED how to statically compile Qt using MinGW compiler and SSL support
      Installation and Deployment • qmake openssl static build ssl qt 5 • • CybeX  

      4
      2
      Votes
      4
      Posts
      565
      Views

      i am facing the same nightmare. it's 2weeks i'm stuck tryin' to obtain my static +openssl build and...no way. No issues compiling without openssl support. Any progress on that? Seems that nobody wants to help :(
    • UNSOLVED QtQuick 2 controls aren't visible in QML-designer after Qt static building
      QML and Qt Quick • qml qtquick2 qt designer static build design mode • • HoShiMin  

      1
      0
      Votes
      1
      Posts
      200
      Views

      No one has replied

    • UNSOLVED QT 5.13.0 Static Commercial Build - Requiring D3D12.dll?
      General and Desktop • static build commercial directx • • FuzzeWuzze  

      2
      0
      Votes
      2
      Posts
      359
      Views

      Hi, Since you have a commercial licence, I would recommend opening an issue directly from your account as you have access to support.
    • SOLVED Does QT configuration tool help in optimizing application size ?
      Tools • configure static build configuration configure tool • • Srinivasan  

      5
      0
      Votes
      5
      Posts
      1297
      Views

      @sierdzio Thank you. Will look into it.
    • UNSOLVED "Mismatch detected for RuntimeLibrary" when trying to statically compile with a static build of Qt
      Installation and Deployment • static build msvc2017 • • EinderJam  

      3
      0
      Votes
      3
      Posts
      1105
      Views

      @EinderJam said in "Mismatch detected for RuntimeLibrary" when trying to statically compile with a static build of Qt: Before building, using this tutorial, I modified qt-everywhere-src-5.11.1\qtbase\mkspecs\msvc-desktop.conf and replaced every -MD by -MT Build process went fine. If you changed the Qt compilation flags at some point, did you clean out absolutely everything before rebuilding? Many times it seems bits get left over which have been compiled with previous flags.
    • SOLVED Qt Static Build Configuration
      General and Desktop • static static build msvc2015 nmake 5.10.1 • • ed-wright  

      4
      0
      Votes
      4
      Posts
      677
      Views

      @ed-wright Not sure, but probably you have to do a "nmake distclean" in between or it finds your license information. However, this is the opensource forum. You would need to approach the commercial, they have to able to give the proper answer.
    • SOLVED Static Builds not Working
      General and Desktop • static static build msvc2015 nmake 5.10.1 • • ed-wright  

      19
      0
      Votes
      19
      Posts
      5935
      Views

      Super good work. Thanks for updating on the way. will be helpful for others.
    • UNSOLVED Building QT from source code statically to be used with Visual Studio
      Installation and Deployment • visual studio deployment static build visual c++ x64 • • onat  

      2
      0
      Votes
      2
      Posts
      989
      Views

      Hi, Use the amd64 command prompt when building Qt.
    • UNSOLVED Runtime error: “must construct a QApplication before a QWidget” when launching a QDialog from a dll built with static Qt
      General and Desktop • qwidget dll static build qapplication static linking • • awyarbr  

      2
      0
      Votes
      2
      Posts
      1127
      Views

      Hi and welcome to devnet, Do you have any static QWidget based class in your library/application ?
    • SOLVED Qt Build 5.9.1 Static with OCI Driver
      General and Desktop • static build driver build error oci static qt • • Slane  

      10
      0
      Votes
      10
      Posts
      3806
      Views

      I made several modifications ... but i think the properly modifications are In : QtSrc\qtbase\mkspecs\win32-g++\qmake.conf add QMAKE_LFLAGS += -static -static-libgcc QMAKE_CFLAGS_RELEASE -= -O2 QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer DEFINES += QT_STATIC_BUILD In : QtSrc\qtbase\src\plugins\sqldrivers\oci\oci.pro add QMAKE_LFLAGS += oracle_home\oci\lib\msvc\oci.lib QMAKE_LFLAGS += oracle_home\oci\lib\msvc\ociw32.lib QMAKE_LFLAGS += oracle_home\oci\lib\msvc\oraocci11.lib LIBS += -Loracle_home\oci\lib\msvc -loci -lociw32 -loraocci11 INCLUDEPATH += oracle_home\oci\include cmd -static -debug-and-release -platform win32-g++ -prefix QtPath\Static -I C:\\OpenSSL-Win32\\include -L C:\\OpenSSL-Win32\\lib -opensource -confirm-license -c++std c++14 -nomake examples -skip qtdoc -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech -skip location -no-opengl -no-angle -qt-zlib -qt-pcre -qt-libpng -no-libjpeg -qt-freetype -sql-oci -I oracle_home\oci\include -L oracle_home\oci\lib\msvc try it. the other modifications do not matter
    • SOLVED Qt Static Compile Linux - Error Loading libxcb-xinerama.so
      General and Desktop • linux static build g++ • • ScottLupton  

      12
      0
      Votes
      12
      Posts
      7625
      Views

      @SGaist @SGaist said in Qt Static Compile Linux - Error Loading libxcb-xinerama.so: If you have a license than contact the Qt Company directly with your issue Unforunatly, it does not work for the "static build" issues. I've spent many weeks doing Qt static builds for linux and macOS, including OpenSSL. Before version Qt 5.15 it was very tricky but possible (except some special issues with ICU). Application run without installation packages and any additionl libs on Ubuntu 16 and higher. But now, they removed -qt-xcb flag ( https://doc.qt.io/qt-5/linux-requirements.html ) and the number of dependencies has grown dramatically. Below I will talk about an empty Qt application only. Without OpenSSL, curl, etc. Here is dependency list of the empty app run at Ubuntu 20. Build station: static Qt 5.15 and ubuntu 16. alex@alex-ubuntu-clean:~$ ldd test linux-vdso.so.1 (0x00007ffeb7793000) libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ff32d63a000) libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff32d57b000) libxcb-glx.so.0 => /lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007ff32d55e000) libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007ff32d559000) libxcb-icccm.so.4 => /lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007ff32d552000) libxcb-image.so.0 => /lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007ff32d34d000) libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007ff32d346000) libxcb-keysyms.so.1 => /lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007ff32d341000) libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007ff32d32e000) libxcb-render-util.so.0 => /lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007ff32d327000) libxcb-sync.so.1 => /lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007ff32d31d000) libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007ff32d313000) libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007ff32d302000) libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007ff32d2fd000) libxcb-xinerama.so.0 => not found libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007ff32d2df000) libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff32d2b5000) libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff32d178000) libxkbcommon-x11.so.0 => /lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007ff32d16b000) libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007ff32d129000) libicui18n.so.55 => not found libicuuc.so.55 => not found libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff32d123000) libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007ff32d09b000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff32d076000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff32ce95000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff32cd46000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff32cd2b000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff32cb39000) /lib64/ld-linux-x86-64.so.2 (0x00007ff32d692000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff32cb0b000) libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007ff32cb00000) libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007ff32cac8000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff32caac000) libxcb-util.so.1 => /lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007ff32c8a6000) libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff32c8a0000) libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff32c896000) libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007ff32c7de000) libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007ff32c7aa000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007ff32c790000) Of cource it does not start. alex@alex-ubuntu-clean:~$ ./test ./test: error while loading shared libraries: libxcb-xinerama.so.0: cannot open shared object file: No such file or directory So, I need to build package or installer. Here is dependency list of the not empty real app. Build station: static Qt 5.14.2 and ubuntu 16. alex@alex-ubuntu-clean:~/Documents/rms.viewer.1.0.7.b7$ ldd viewer linux-vdso.so.1 (0x00007ffcdef1a000) libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f719bbde000) libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f719bb1f000) libxcb-glx.so.0 => /lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f719bb02000) libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f719bafd000) libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f719bad3000) libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f719b996000) libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f719b952000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f719b94c000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f719b930000) libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f719b8a8000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f719b885000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f719b6a4000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f719b553000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f719b538000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f719b346000) /lib64/ld-linux-x86-64.so.2 (0x00007f719bc36000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f719b318000) libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f719b30f000) libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f719b2d7000) libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f719b2cf000) libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f719b2c7000) libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f719b20f000) libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f719b1db000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f719b1c1000) It's not perfect, but it's acceptable and it works on many systems.
    • Apply Enterprise License to Static QT
      Installation and Deployment • static build license • • jordanbaucke  

      5
      0
      Votes
      5
      Posts
      1244
      Views

      @jordanbaucke Sure, since you have commercial license you can bring the point directly to support.
    • UNSOLVED Static build - size of exe too big
      General and Desktop • static build size exe • • christos.alewa  

      11
      0
      Votes
      11
      Posts
      5882
      Views

      You could certainly make use of UPX, it should get the filesize down to maybe 4MB (by using compression).
    • UNSOLVED QtWebEngine - static
      General and Desktop • visual studio qtwebengine static build • • Soeren  

      5
      0
      Votes
      5
      Posts
      3239
      Views

      Thanks. I take a look at hat and at http://tishion.github.io/QCefView/ But then we end up in using an extra lib. Something we want to avoid.... :-(
    • SOLVED Why Qt needs to be configured with static parameter to create static build programs
      Installation and Deployment • static build static conf • • KCaglarCoskun  

      2
      0
      Votes
      2
      Posts
      863
      Views

      Hi and welcome to devnet, If you want a full static application then you have to also build all dependencies as static and since you're on Windows, you also have to take into account the Visual Studio Runtime (since you are using a Visual Studio Qt build). Note that this is nothing Qt specific. No, you don't have to delete anything, you can use several builds of Qt in parallel without any problem. How fast your build time will be depends on the machine you have. Developing applications and the type of builds are two completely unrelated topics. Note that using a static build of Qt has licensing implications.
    • SOLVED Unable to link Qt application statically
      Installation and Deployment • qt5.5 arm static build plugins static linking • • zappy  

      9
      0
      Votes
      9
      Posts
      6594
      Views

      Okay... finally i solved it. Nothing to do with .pro file or PLUGIN macro. It was a basic PATH issue. qmake was searching for 'plugin' directory in /PREFIX path not in /SYSROOT/PREFIX path. I just copied all plugin directory from /SYSROOT/PREFIX to /PREFIX directory. I know this may not be the right way, but it temporarily solved my issue. If someone could suggest the correct solution please let me know.
    • SOLVED Qt 5.6 Linux compile fails
      General and Desktop • static build qt 5.6 linux mint • • Jedd  

      3
      0
      Votes
      3
      Posts
      1626
      Views

      Thatt did the trick, thanks!
    • SOLVED Building Static Qt
      General and Desktop • static build • • shahriar25  

      10
      0
      Votes
      10
      Posts
      3943
      Views

      As long as you abide by the GPL, you're good.
    • UNSOLVED How do I install Crypto++ in Qt Visual Studio 2010 Windows 7?
      General and Desktop • static build msvc encrypt crypto qt 4.7.4 • • Narthan  

      6
      0
      Votes
      6
      Posts
      1967
      Views

      You have a list of examples here
    • UNSOLVED Building/Running static plugin?
      Installation and Deployment • plugin static static build • • RyanB  

      2
      0
      Votes
      2
      Posts
      1790
      Views

      use macro: Q_IMPORT_PLUGIN(QLinuxFbIntegrationPlugin);
    • SOLVED Qt 5.5.1 OS X 10.11 Static linkage Qt Multimedia
      Installation and Deployment • qtmultimedia static build mac os • • Ivan Kolesnikov  

      21
      0
      Votes
      21
      Posts
      7658
      Views

      I updated a .pro file to the following state: QT += core multimedia widgets QT -= gui TARGET = MetadataExtractor CONFIG += console CONFIG += static TEMPLATE = app SOURCES += main.cpp extractor.cpp HEADERS += extractor.h Then used the macdeployqt. This issue is resolved for me. @SGaist @Tyras @kshegunov Thanks to Everyone!
    • UNSOLVED QtWebKit compiling errors
      General and Desktop • qt5 windows static build compile qtwebkit • • sp00lin9  

      3
      0
      Votes
      3
      Posts
      1990
      Views

      @Konstantin-Tokarev yes it is, i was thinking of trying an older version of ruby as i just grabbed the newest one..
    • UNSOLVED Custom static build fails on plugins
      General and Desktop • static build plugins 5.5.1 imageformats • • EMStegehuis  

      1
      0
      Votes
      1
      Posts
      665
      Views

      No one has replied

    • UNSOLVED Strange behaviour of a program built with a static Qt
      Installation and Deployment • static build ubuntu 15.10 • • mchome  

      4
      0
      Votes
      4
      Posts
      1319
      Views

      Having a static Qt doesn't mean that all dependencies are gone. Qt might be static but unless you also link to the static version of all its dependencies, what you have is normal: OpenGL and the xcb plugin deps.
    • UNSOLVED Building static version
      General and Desktop • static build • • gabor53  

      3
      0
      Votes
      3
      Posts
      703
      Views

      Use this. My Problem was solved by following that mentioned steps. Before you start, read the comments below.
    • UNSOLVED "undefined reference to 'qt_static_plugin_AccessibleFactory()'" for static Qt build during exe build
      General and Desktop • static build plugins static library • • pditty8811  

      3
      0
      Votes
      3
      Posts
      1388
      Views

      Does anyone have instructions for Qt static build that is version 5.4 or greater?
    • [Solved] Biologist using a Qt built program - how can I run it??
      General and Desktop • build static build run • • Skeffington  

      6
      0
      Votes
      6
      Posts
      1969
      Views

      @Skeffington Cheers :)
    • OCI driver in static build[solved]
      General and Desktop • qt5.5 static build oci • • Giorgi  

      7
      0
      Votes
      7
      Posts
      2583
      Views

      The XXX was meant to be replaced with whatever sql plugin you wanted to have built-in Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)
    • Translation of QDialogButtonBox in statically build app
      General and Desktop • qt5 static build translation • • Radim  

      6
      0
      Votes
      6
      Posts
      2162
      Views

      Finally I'm able to automatically copy the qt translation files and create resource file from the pro file: TRANSLATIONS = myapp_cs.ts \ myapp_xx.ts QT_TRANSLATIONS = qtbase_cs.qm #------------------------------------------------- # create lang folder QM_DIR = $$shadowed($${PWD})/lang mkpath($${QM_DIR}) mkpath($${QM_DIR}/lang) #------------------------------------------------- # copy system translation files to lang folder for(FILE,QT_TRANSLATIONS){ FILE = $$shell_path($$[QT_INSTALL_TRANSLATIONS]/$${FILE}) system($${QMAKE_COPY} $${FILE} $$shell_path($${QM_DIR}/lang)) } #------------------------------------------------- #generate qm files directly from qmake for(FILE,TRANSLATIONS){ QM_FILE = $$shell_path($${QM_DIR}/lang/$$replace(FILE,.ts,.qm)) system(lrelease $${FILE} -qm $${QM_FILE}) } #------------------------------------------------- #create resource file with translations win32:system(cd $$shell_path($${QM_DIR}) & rcc --project -o lang.qrc) unix:system(cd $$shell_path($${QM_DIR}) ; rcc --project -o lang.qrc) RESOURCES += $${QM_DIR}/lang.qrc #------------------------------------------------- # extra target to generate ts translation files lupdate.commands = lupdate $$_PRO_FILE_ lupdate.depends = FORCE QMAKE_EXTRA_TARGETS += lupdate #------------------------------------------------- # extra compiler to generate qm translation files lrelease.input = TRANSLATIONS lrelease.output = $${QM_DIR}/lang/${QMAKE_FILE_BASE}.qm lrelease.commands = lrelease ${QMAKE_FILE_NAME} -qm ${QMAKE_FILE_OUT} lrelease.CONFIG += no_link target_predeps QMAKE_EXTRA_COMPILERS += lrelease
    • ANGLE with static 5.5 build
      General and Desktop • qt 5.5 static static build opengl es angle • • dbrunner  

      2
      0
      Votes
      2
      Posts
      1612
      Views

      Another interesting development: I tried running on another machine with the Qt toolchain installed, and the program worked. So it appears it is still reading something from the filesystem that is not on a regular Windows machine, but I don't know what that might be. I did package all the qmldir files needed for Qt Quick to work.
    • Error encountered while doing a static build of a Qt application
      General and Desktop • static build mingw32 5.2.1 • • Connie  

      2
      0
      Votes
      2
      Posts
      1052
      Views

      I have a similar issue as well. some error while compiling. although instead of undefined reference to i am getting something like deprecated function. No idea whats the problem. Thanks Scot V Development Team Fastest Web Browser
    • Unable to run Application compiled by QT creator in other windows machine
      Installation and Deployment • installation static build compilation • • jitu059_Lalat  

      2
      0
      Votes
      2
      Posts
      1059
      Views

      @jitu059_Lalat The long and short if it are, you have two ways to do this: Find all the dll's that your app depends on. You can do this with the tool http://www.dependencywalker.com/. Once you found all the dll's copy them into the same folder as your executable. This is now your "delivery package" you will copy the executable + dlls from PC to PC. This method is perhaps a bit easier/faster in the short term, but when you compile with different versions of Qt/Windows you may require a different set of dlls (i.e. Qt4 Dlls don't match Qt5 Dlls). Download the Qt source code and compile it for static linking. Then when you build your code you will get a much larger executable file, but it will contain everything it needs - a standalone executable. This is perhaps a bit more work on your part, but master this and it makes deploying your project from PC to PC much easier. Have a go at one or other method, if you get stuck then ask again. But as SGaist said, there is lots of documentation out there already : )
    • [solved] Qt5.5 static build failed: QQmlDebugServerThread::run(): error: undefined reference to 'QTcpServerConnection::QTcpServerConnection()'
      General and Desktop • linux qt5.5 static build • • code_fodder  

      9
      1
      Votes
      9
      Posts
      7431
      Views

      I can confirm similar issue on Mac OS X 10.11.3. But successful build was with with flags: -nomake examples -nomake tests
    • How to build Qt5.5 with QWebEngine staticly?
      QtWebEngine • qt5.5 qtwebengine static build • • Duino  

      2
      0
      Votes
      2
      Posts
      1259
      Views

      Waiting online~~~
    • [SOLVED]Deploying a Qt Quick 2 plugin with a static build
      QML and Qt Quick • deployment static build qmldir qt.conf extension plugi • • Monomix  

      6
      1
      Votes
      6
      Posts
      4779
      Views

      On it. Merci!