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. build with static Qt missing library
Forum Updated to NodeBB v4.3 + New Features

build with static Qt missing library

Scheduled Pinned Locked Moved Solved Installation and Deployment
9 Posts 4 Posters 923 Views 2 Watching
  • 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.
  • M Offline
    M Offline
    mzimmers
    wrote on 3 May 2023, 23:31 last edited by mzimmers 5 Apr 2023, 15:58
    #1

    Hi all -

    I've built a static version of Qt, and built my application with it. On my system, it works: I can pull it out of the build directory, double click on it, and it opens fine. So, I thought I had the problem solved. BUT: when I shared this file with someone else, he got an error message about "libgcc_s_seh-1.dll was not found."

    This has me confused on a couple of levels:

    1. Why is my (supposedly) self-contained image looking for a .dll in the first place?
    2. I'm using the Qt-provided MinGW toolchain, so why is it looking for a gcc library?

    I imagine this is all due to some mistake I made, but I'm not sure what additional information to provide. Can someone provide some insight?

    EDIT: I found on this page that the configure command for the Qt build should include a "-no-exceptions" switch. I didn't do that (I've never done that in the past). According to the fine print at the bottom of the page, that page was last edited over 5 years ago, so I don't know whether that's still relevant.

    EDIT again: the "-no-exceptions" modifier was rejected by my configure attempt.

    Thanks...

    C 1 Reply Last reply 4 May 2023, 15:51
    0
    • M mzimmers
      3 May 2023, 23:31

      Hi all -

      I've built a static version of Qt, and built my application with it. On my system, it works: I can pull it out of the build directory, double click on it, and it opens fine. So, I thought I had the problem solved. BUT: when I shared this file with someone else, he got an error message about "libgcc_s_seh-1.dll was not found."

      This has me confused on a couple of levels:

      1. Why is my (supposedly) self-contained image looking for a .dll in the first place?
      2. I'm using the Qt-provided MinGW toolchain, so why is it looking for a gcc library?

      I imagine this is all due to some mistake I made, but I'm not sure what additional information to provide. Can someone provide some insight?

      EDIT: I found on this page that the configure command for the Qt build should include a "-no-exceptions" switch. I didn't do that (I've never done that in the past). According to the fine print at the bottom of the page, that page was last edited over 5 years ago, so I don't know whether that's still relevant.

      EDIT again: the "-no-exceptions" modifier was rejected by my configure attempt.

      Thanks...

      C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 4 May 2023, 15:51 last edited by Christian Ehrlicher 5 Apr 2023, 15:52
      #2

      @mzimmers said in build with static Qt missing library:

      Why is my (supposedly) self-contained image looking for a .dll in the first place?

      Because this is a dependency of gcc/mingw for exception handling as you already found out.

      I'm using the Qt-provided MinGW toolchain, so why is it looking for a gcc library?

      MinGW = gcc on windows

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      M 1 Reply Last reply 4 May 2023, 16:01
      0
      • C Christian Ehrlicher
        4 May 2023, 15:51

        @mzimmers said in build with static Qt missing library:

        Why is my (supposedly) self-contained image looking for a .dll in the first place?

        Because this is a dependency of gcc/mingw for exception handling as you already found out.

        I'm using the Qt-provided MinGW toolchain, so why is it looking for a gcc library?

        MinGW = gcc on windows

        M Offline
        M Offline
        mzimmers
        wrote on 4 May 2023, 16:01 last edited by
        #3

        @Christian-Ehrlicher said in build with static Qt missing library:

        Because this is a dependency of gcc/mingw for exception handling as you already found out.

        Right, but why is it trying to use a .dll (instead of a static library)? Here's my configure command:

        configure.bat -opensource -confirm-license -static -static-runtime -release -platform win32-g++ -opengl desktop -skip qtwebengine -nomake examples -nomake tests -Wno-dev -prefix c:\qt\6.5.0_static 
        

        Note the -static and -static-runtime options. This used to work. The various docs for building Qt on Windows are of varied currency, so I'm not sure which one to believe, but do you see anything in my command that I'm doing wrong?

        Thanks...

        C J 2 Replies Last reply 4 May 2023, 16:12
        0
        • M mzimmers
          4 May 2023, 16:01

          @Christian-Ehrlicher said in build with static Qt missing library:

          Because this is a dependency of gcc/mingw for exception handling as you already found out.

          Right, but why is it trying to use a .dll (instead of a static library)? Here's my configure command:

          configure.bat -opensource -confirm-license -static -static-runtime -release -platform win32-g++ -opengl desktop -skip qtwebengine -nomake examples -nomake tests -Wno-dev -prefix c:\qt\6.5.0_static 
          

          Note the -static and -static-runtime options. This used to work. The various docs for building Qt on Windows are of varied currency, so I'm not sure which one to believe, but do you see anything in my command that I'm doing wrong?

          Thanks...

          C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 4 May 2023, 16:12 last edited by
          #4

          There is nothing wrong but afaik you have to create a static version of the missing library by yourself or simply distribute it. Don't know why all want a static version of Qt though...

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          M S 2 Replies Last reply 4 May 2023, 16:27
          0
          • C Christian Ehrlicher
            4 May 2023, 16:12

            There is nothing wrong but afaik you have to create a static version of the missing library by yourself or simply distribute it. Don't know why all want a static version of Qt though...

            M Offline
            M Offline
            mzimmers
            wrote on 4 May 2023, 16:27 last edited by
            #5

            @Christian-Ehrlicher you may be right, but I never had to do that in the past.

            Regarding the necessity of a static build...currently my application is in the demo stage. Various people would like to see it. Giving them a single (.exe) file is the simplest way to accomplish this. Distributing the various gcc files with it could be cumbersome.

            1 Reply Last reply
            0
            • M mzimmers
              4 May 2023, 16:01

              @Christian-Ehrlicher said in build with static Qt missing library:

              Because this is a dependency of gcc/mingw for exception handling as you already found out.

              Right, but why is it trying to use a .dll (instead of a static library)? Here's my configure command:

              configure.bat -opensource -confirm-license -static -static-runtime -release -platform win32-g++ -opengl desktop -skip qtwebengine -nomake examples -nomake tests -Wno-dev -prefix c:\qt\6.5.0_static 
              

              Note the -static and -static-runtime options. This used to work. The various docs for building Qt on Windows are of varied currency, so I'm not sure which one to believe, but do you see anything in my command that I'm doing wrong?

              Thanks...

              J Offline
              J Offline
              JoeCFD
              wrote on 4 May 2023, 18:01 last edited by JoeCFD 5 Apr 2023, 18:03
              #6

              @mzimmers libgcc_s_seh-1.dll is not a part of Qt. Although you built a static Qt, it does not mean you built your app or Qt with a static gcc_s_seh-1. Check the dependencies of libgcc_s_seh-1.dll and wrap it with its app. Or find a static libgcc_s_seh-1 to build your app or Qt.

              M 1 Reply Last reply 4 May 2023, 23:08
              0
              • J JoeCFD
                4 May 2023, 18:01

                @mzimmers libgcc_s_seh-1.dll is not a part of Qt. Although you built a static Qt, it does not mean you built your app or Qt with a static gcc_s_seh-1. Check the dependencies of libgcc_s_seh-1.dll and wrap it with its app. Or find a static libgcc_s_seh-1 to build your app or Qt.

                M Offline
                M Offline
                mzimmers
                wrote on 4 May 2023, 23:08 last edited by
                #7

                @JoeCFD I'm not disagreeing with you, but my point is, the steps I'm following used to produce a standalone image. So, either something has changed in the build procedure, or I'm doing something wrong with my current project settings.

                @Christian-Ehrlicher may have a valid point, about the appropriateness of this effort. Maybe I should look into an installer. It's just that this was relatively easy in the past.

                1 Reply Last reply
                0
                • C Christian Ehrlicher
                  4 May 2023, 16:12

                  There is nothing wrong but afaik you have to create a static version of the missing library by yourself or simply distribute it. Don't know why all want a static version of Qt though...

                  S Offline
                  S Offline
                  SimonSchroeder
                  wrote on 5 May 2023, 07:23 last edited by
                  #8

                  @Christian-Ehrlicher said in build with static Qt missing library:

                  Don't know why all want a static version of Qt though...

                  DLLs is too much trouble for inhouse development as well as distribution. Our software consists of several individual programs. Sometimes our clients just swap out a single executable for a newer version. We used to have our GUI application written in wxWidgets which had a separate resource file. Just having two files that needed to be on the same version was too much hassle. Some would even have two different versions of the executable, but both would reference the same resource file. With changes inside the resource file (which contains menus and dialogs) only one of them would run properly. The same version mismatch can happen with DLLs.

                  For inhouse development it is a problem with DLLs because the developer machines (only two) have slightly different configurations. We need two different sets of DLLs based on who compiled the software. This makes it harder to just swap something on the other computers of our non-developing users.

                  The same applies to Linux where we are now using AppImages because otherwise library incompatibilities might arise.

                  Always assume the dumbest user possible. Then, a single file solution will save you a lot of headaches.

                  M 1 Reply Last reply 4 Jul 2023, 21:14
                  1
                  • S SimonSchroeder
                    5 May 2023, 07:23

                    @Christian-Ehrlicher said in build with static Qt missing library:

                    Don't know why all want a static version of Qt though...

                    DLLs is too much trouble for inhouse development as well as distribution. Our software consists of several individual programs. Sometimes our clients just swap out a single executable for a newer version. We used to have our GUI application written in wxWidgets which had a separate resource file. Just having two files that needed to be on the same version was too much hassle. Some would even have two different versions of the executable, but both would reference the same resource file. With changes inside the resource file (which contains menus and dialogs) only one of them would run properly. The same version mismatch can happen with DLLs.

                    For inhouse development it is a problem with DLLs because the developer machines (only two) have slightly different configurations. We need two different sets of DLLs based on who compiled the software. This makes it harder to just swap something on the other computers of our non-developing users.

                    The same applies to Linux where we are now using AppImages because otherwise library incompatibilities might arise.

                    Always assume the dumbest user possible. Then, a single file solution will save you a lot of headaches.

                    M Offline
                    M Offline
                    mzimmers
                    wrote on 4 Jul 2023, 21:14 last edited by
                    #9

                    Marking this as solved, not because it is, but because I've run into more significant issues building QT since I moved to 6.5.1.

                    Bug report.

                    1 Reply Last reply
                    0
                    • M mzimmers has marked this topic as solved on 4 Jul 2023, 21:14

                    • Login

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