Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Static Linking Windows
Forum Updated to NodeBB v4.3 + New Features

Static Linking Windows

Scheduled Pinned Locked Moved Solved Installation and Deployment
3 Posts 2 Posters 1.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cambo
    wrote on last edited by
    #1

    Recently I inherited a QT project for Windows and Ubuntu.
    Eventually after much pain I managed to get an executable for windows.
    Unfortunately, when I run the windows exe, I get a popup saying the likes of:
    "QT5Gui.dll was not found"

    All I want is to tell QT Creator or whatever to make a static version of the exe.
    How do I do this?
    I'm running QTCreator 7 with QT5.12.2 and MSYS2 (mingw 32 bit)

    I ran windeployqt.exe but it seems bugged as the -v command doesn't work
    so I can't tell you which version it is.

    My second humble request is what arguments do I use on windeployqt?

    Also, I read about ./configure -static <some params> unfortunately I can;t find that exe anywhere and it is no where near clear where I get that exe

    jsulmJ 1 Reply Last reply
    0
    • jsulmJ jsulm

      @Cambo If you want to use windwployqt you do not need static build.
      How to use windeployqt is explained here: https://doc.qt.io/qt-5/windows-deployment.html
      -v should work, what happens if you try to use it? Also on Windows try /v

      If you want to build statically you first have to build Qt statically as QtCompany does not provide static builds. You can find some hints here: https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW

      C Offline
      C Offline
      Cambo
      wrote on last edited by
      #3

      @jsulm Hey thanks mate, i'm downloading the SDK now, another step, hopefully once off.

      With a bit of fiddling with windeployqt found that this worked and I could run the application:

      windeployqt --release --compiler-runtime <path to your binary>
      

      Thankfully, this dampens the urgency of static builds for the moment as I can just shove it all in an installer.

      Thanks for your help

      1 Reply Last reply
      1
      • C Cambo

        Recently I inherited a QT project for Windows and Ubuntu.
        Eventually after much pain I managed to get an executable for windows.
        Unfortunately, when I run the windows exe, I get a popup saying the likes of:
        "QT5Gui.dll was not found"

        All I want is to tell QT Creator or whatever to make a static version of the exe.
        How do I do this?
        I'm running QTCreator 7 with QT5.12.2 and MSYS2 (mingw 32 bit)

        I ran windeployqt.exe but it seems bugged as the -v command doesn't work
        so I can't tell you which version it is.

        My second humble request is what arguments do I use on windeployqt?

        Also, I read about ./configure -static <some params> unfortunately I can;t find that exe anywhere and it is no where near clear where I get that exe

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #2

        @Cambo If you want to use windwployqt you do not need static build.
        How to use windeployqt is explained here: https://doc.qt.io/qt-5/windows-deployment.html
        -v should work, what happens if you try to use it? Also on Windows try /v

        If you want to build statically you first have to build Qt statically as QtCompany does not provide static builds. You can find some hints here: https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        C 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Cambo If you want to use windwployqt you do not need static build.
          How to use windeployqt is explained here: https://doc.qt.io/qt-5/windows-deployment.html
          -v should work, what happens if you try to use it? Also on Windows try /v

          If you want to build statically you first have to build Qt statically as QtCompany does not provide static builds. You can find some hints here: https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW

          C Offline
          C Offline
          Cambo
          wrote on last edited by
          #3

          @jsulm Hey thanks mate, i'm downloading the SDK now, another step, hopefully once off.

          With a bit of fiddling with windeployqt found that this worked and I could run the application:

          windeployqt --release --compiler-runtime <path to your binary>
          

          Thankfully, this dampens the urgency of static builds for the moment as I can just shove it all in an installer.

          Thanks for your help

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved