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. Deploy binary can't find method in DLLs

Deploy binary can't find method in DLLs

Scheduled Pinned Locked Moved Solved General and Desktop
7 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.
  • K Offline
    K Offline
    kitfox
    wrote on last edited by
    #1

    I'm trying to figure out how to create a deployable for Windows. I'm using windeployqt.exe to find the dlls I need for my exe file. None the less, when I try to run from the command line, I get a popup with the message:

    The procedure entry point _ZIs6QDebugRK9QFileInfo could not be located in the dynamic link library.
    

    This doesn't seem to happen when I try the same thing using a new test project, even if it includes a QFileInfo object.

    Any idea why this isn't working?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kitfox
      wrote on last edited by kitfox
      #2

      After investigating more, I've discovered that my app also crashes on startup if I try to build and run in release mode through Qt Creator. There are no useful error message - the app simply crashes without even opening the main window.

      The program works well in debug mode, though.

      aha_1980A 1 Reply Last reply
      0
      • K kitfox

        After investigating more, I've discovered that my app also crashes on startup if I try to build and run in release mode through Qt Creator. There are no useful error message - the app simply crashes without even opening the main window.

        The program works well in debug mode, though.

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @kitfox such thing can happen, if a wrong DLL version is loaded, because someone copied to the folder or modified the PATH enironment variable.

        Dependency Walker can help you to debug such issues.

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        1
        • K Offline
          K Offline
          kitfox
          wrote on last edited by kitfox
          #4

          After reworking things, I can now run a release build via the Qt Creator IDE and even from the command line provided my path includes C:\Qt\5.12.3\mingw73_32\bin. However, I need this to be able to run on machines that don't have Qt installed.

          To try and mimic a 'dry' installaton, I commented out C:\Qt\5.12.3\mingw73_32\bin on my PATH. I then ran windeployqt.exe to try to find the DLLs I need, but this seems to skip over libgcc_s_dw2-1.dll and libwinpthread_1.dll. After manually copying these files into my deploy directory from C:\Qt\5.12.3\mingw73_32\bin and trying to run again, I get a lot of errors about procedure entry points not being found in the dll. If I add C:\Qt\5.12.3\mingw73_32\bin back to my path, I can run again.

          Dependency Walker lists these dlls as dependencies:

          qt5core.dll
          qt5gui.dll
          qt5qml.dll
          qt5widgets.dll
          qt5xml.dll
          libgcc_s_dw2-1.dll
          kernel32.dll
          msvcrt.dll
          shell32.dll
          libstdc++-6.dll
          avcodec-58.dll
          avformat-58.dll
          avutil-56.dll
          swresample-3.dll
          swscale-5.dll
          

          The last five dlls are for a third party library. I manually copied them into my deploy directory. Everything else is there too, except for kernel32, msvcrt, shell32 and libstdc++-6 which I presume are system files.

          I'm not sure how to fix this because I'm no longer getting errors that dlls are missing - just that procedure entry points are wrong.

          aha_1980A 1 Reply Last reply
          0
          • K kitfox

            After reworking things, I can now run a release build via the Qt Creator IDE and even from the command line provided my path includes C:\Qt\5.12.3\mingw73_32\bin. However, I need this to be able to run on machines that don't have Qt installed.

            To try and mimic a 'dry' installaton, I commented out C:\Qt\5.12.3\mingw73_32\bin on my PATH. I then ran windeployqt.exe to try to find the DLLs I need, but this seems to skip over libgcc_s_dw2-1.dll and libwinpthread_1.dll. After manually copying these files into my deploy directory from C:\Qt\5.12.3\mingw73_32\bin and trying to run again, I get a lot of errors about procedure entry points not being found in the dll. If I add C:\Qt\5.12.3\mingw73_32\bin back to my path, I can run again.

            Dependency Walker lists these dlls as dependencies:

            qt5core.dll
            qt5gui.dll
            qt5qml.dll
            qt5widgets.dll
            qt5xml.dll
            libgcc_s_dw2-1.dll
            kernel32.dll
            msvcrt.dll
            shell32.dll
            libstdc++-6.dll
            avcodec-58.dll
            avformat-58.dll
            avutil-56.dll
            swresample-3.dll
            swscale-5.dll
            

            The last five dlls are for a third party library. I manually copied them into my deploy directory. Everything else is there too, except for kernel32, msvcrt, shell32 and libstdc++-6 which I presume are system files.

            I'm not sure how to fix this because I'm no longer getting errors that dlls are missing - just that procedure entry points are wrong.

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by aha_1980
            #5

            @kitfox

            Yeah, adding Qt\bin folders to PATH can lead to things like this, especially when you have multiple Qt versions installed. So I can only discourage you to do this.

            Do deploy your app, you should use https://doc.qt.io/qt-5/windows-deployment.html

            Regards

            Edit: Beside the DLLs Dependency Walker lists, there are more needed, e.g. the plugins that are loaded at runtime.

            Which modules do you include in your .pro file?

            Qt has to stay free or it will die.

            K 1 Reply Last reply
            1
            • aha_1980A aha_1980

              @kitfox

              Yeah, adding Qt\bin folders to PATH can lead to things like this, especially when you have multiple Qt versions installed. So I can only discourage you to do this.

              Do deploy your app, you should use https://doc.qt.io/qt-5/windows-deployment.html

              Regards

              Edit: Beside the DLLs Dependency Walker lists, there are more needed, e.g. the plugins that are loaded at runtime.

              Which modules do you include in your .pro file?

              K Offline
              K Offline
              kitfox
              wrote on last edited by kitfox
              #6

              @aha_1980 I am using that. It added a lot of files to my deploy directory, but skipped libgcc_s_dw2-1.dll and libwinpthread-1.dll, as I stated above. Also, I have removed the Qt path from PATH. That is what is causing the error. It is the Windows Deployment tool that is giving me invalid files.

              My .pro includes the modules

              QT += core gui
              QT += qml xml
              
              1 Reply Last reply
              0
              • K Offline
                K Offline
                kitfox
                wrote on last edited by
                #7

                Turns out I needed to add libstdc++-6.dll to my deploy directory as well. I was able to run after this.

                1 Reply Last reply
                0

                • Login

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