Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. creating win32 app issue (windows)
Forum Updated to NodeBB v4.3 + New Features

creating win32 app issue (windows)

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 377 Views 1 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.
  • Q Offline
    Q Offline
    qAlexKo
    wrote on 3 Sept 2024, 09:08 last edited by
    #1

    Please help if you met a similar issue.

    My test aim is to create a all-sufficient win32 exe app (for instance, an app with the empty window).

    I have windows 7/64, QtCreator 4.11.1 based om Qt5.14.1 (MSCS 2017, 32bit)
    Complilers MinGW 32-bit/MinGW 64-bit

    Everything is OK when I create a 64bit app. I use MinGW 64-bit compliler to make exe app, then I use
    d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_64\bin\windeployqt.exe empty_window_tst2exe.exe
    I add these additional dlls
    libgcc_s_seh-1.dll
    libstdc++-6.dll
    libwinpthread-1.dll

    And the program works perfectly.

    But I need a win32 app, for some reason. So, I create a different project where I use MinGW 32-bit.
    I repeated all the operations with
    d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin\windeployqt.exe empty_window_tst322exe.exe

    But when I start the 32bit app I have this:
    The application was unable to start correctly (0x000007b)

    If I put the 32bit app empty_window_tst322exe.exe to the bin folder
    d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin
    it started OK

    I couldn't reach more. Maybe someone knows a silver bullet for my situation?

    J 1 Reply Last reply 3 Sept 2024, 09:35
    0
    • Q qAlexKo
      3 Sept 2024, 09:08

      Please help if you met a similar issue.

      My test aim is to create a all-sufficient win32 exe app (for instance, an app with the empty window).

      I have windows 7/64, QtCreator 4.11.1 based om Qt5.14.1 (MSCS 2017, 32bit)
      Complilers MinGW 32-bit/MinGW 64-bit

      Everything is OK when I create a 64bit app. I use MinGW 64-bit compliler to make exe app, then I use
      d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_64\bin\windeployqt.exe empty_window_tst2exe.exe
      I add these additional dlls
      libgcc_s_seh-1.dll
      libstdc++-6.dll
      libwinpthread-1.dll

      And the program works perfectly.

      But I need a win32 app, for some reason. So, I create a different project where I use MinGW 32-bit.
      I repeated all the operations with
      d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin\windeployqt.exe empty_window_tst322exe.exe

      But when I start the 32bit app I have this:
      The application was unable to start correctly (0x000007b)

      If I put the 32bit app empty_window_tst322exe.exe to the bin folder
      d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin
      it started OK

      I couldn't reach more. Maybe someone knows a silver bullet for my situation?

      J Offline
      J Offline
      JonB
      wrote on 3 Sept 2024, 09:35 last edited by
      #2

      @qAlexKo said in creating win32 app issue (windows):

      If I put the 32bit app empty_window_tst322exe.exe to the bin folder

      Then it looks like, for whatever reason, the mingw73_32\bin\windeployqt.exe-created .exe file is missing at least on dependent file (DLL?) which is present in d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin directory. Have a look in there, find out what it is, compare against whatever else you added/got in the one which works for the 64-bit version. If you added additional .dlls which you list for the 64-bit won't you need to add similar for the 32-bit?

      Q 1 Reply Last reply 3 Sept 2024, 10:54
      1
      • J JonB
        3 Sept 2024, 09:35

        @qAlexKo said in creating win32 app issue (windows):

        If I put the 32bit app empty_window_tst322exe.exe to the bin folder

        Then it looks like, for whatever reason, the mingw73_32\bin\windeployqt.exe-created .exe file is missing at least on dependent file (DLL?) which is present in d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin directory. Have a look in there, find out what it is, compare against whatever else you added/got in the one which works for the 64-bit version. If you added additional .dlls which you list for the 64-bit won't you need to add similar for the 32-bit?

        Q Offline
        Q Offline
        qAlexKo
        wrote on 3 Sept 2024, 10:54 last edited by
        #3

        @JonB said in creating win32 app issue (windows):

        Then it looks like, for whatever reason (skipped)

        It seems I've catched the problem.

        For 64bit:
        windeployqt.exe must have libgcc_s_seh-1.dll which located in
        x:\Qt\Qt5.14.2_3264\Tools\mingw730_64\bin\libgcc_s_seh-1.dll

        For32bit:

        There is no libgcc_s_seh-1.dll in
        x:\Qt\Qt5.14.2_3264\Tools\mingw730_32\bin
        And it was the problem.

        But 32bit version of libgcc_s_seh-1.dll can be located in the exotice place:

        x:\Qt\Qt5.14.2\Tools\mingw730_64\x86_64-w64-mingw32\lib\libgcc_s_seh-1.dll

        And when I added it the win32 app started OK.

        Thanx, you were if not a silver bulet but a good last push. ;)

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qAlexKo
          wrote on 4 Sept 2024, 11:44 last edited by qAlexKo 9 Apr 2024, 12:17
          #4

          Another question -- suppose, I have in my project an mqtt module (qtmqtt) installed into QtCreator manually from its source. Must this module be complied by a 64bit compiler only and therefore I cannot use it in my win32 application which I complile in a 32bit compiler?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 4 Sept 2024, 20:34 last edited by
            #5

            Hi,

            You will have to build the module with the Qt version you want to used it with so the correct compiler will be used automatically.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            Q 1 Reply Last reply 5 Sept 2024, 11:08
            2
            • S SGaist
              4 Sept 2024, 20:34

              Hi,

              You will have to build the module with the Qt version you want to used it with so the correct compiler will be used automatically.

              Q Offline
              Q Offline
              qAlexKo
              wrote on 5 Sept 2024, 11:08 last edited by qAlexKo 12 Sept 2024, 11:28
              #6

              @SGaist said in creating win32 app issue (windows):

              You will have to build the module with the Qt version you want to used it with so the correct compiler will be used automatically.

              Yes, I've done it. I have compliled and installed qtmqtt for mingw32 compiler and it works. The main thing to do is not mix the compiler when you make module for mingw32. In my first attept I did it. I mean the wrong compiler. ;-)

              PS: Maybe for someone will be usefull the URL where he describes how to install qtmqtt module if Qtcreator doesn't have it.
              https://www.codetd.com/en/article/15656509 (link has been removed ;-()

              1 Reply Last reply
              0

              1/6

              3 Sept 2024, 09:08

              • Login

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