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. qmake: qtgui5.dll error
Forum Updated to NodeBB v4.3 + New Features

qmake: qtgui5.dll error

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 4 Posters 2.5k Views 3 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.
  • U Offline
    U Offline
    user4592357
    wrote on last edited by
    #1

    i have a hello.cpp file and a hello.pro file. i run:

    qmake hello.pro
    

    which generated some files. i cd-ed to release directory and tried to run the exe but got

    the procedure entry point _ZdaPvj could not be loaded in the dynamic library C:\Qt\5.8\mingw53_32\bin\Qt5Gui.dll
    

    what am i doing wrong?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you setup the command line you are using for Qt ?

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

      U 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Did you setup the command line you are using for Qt ?

        U Offline
        U Offline
        user4592357
        wrote on last edited by
        #3

        @SGaist

        no, how should i?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Depending on how you installed Qt, you may already have pre-configured command line shortcuts available through the start menu.

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

          1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #5

            Alternatively you try to run
            "C:\Qt\5.9.1\msvc2015_64\bin\qtenv2.bat"
            For you it would be in the mingw53_32 folder

            At least here, it allows me to run exe from commandline if i run it.
            without it i get error about missing dlls.

            U 1 Reply Last reply
            1
            • mrjjM mrjj

              Alternatively you try to run
              "C:\Qt\5.9.1\msvc2015_64\bin\qtenv2.bat"
              For you it would be in the mingw53_32 folder

              At least here, it allows me to run exe from commandline if i run it.
              without it i get error about missing dlls.

              U Offline
              U Offline
              user4592357
              wrote on last edited by
              #6

              @mrjj

              i was able to run the .exe from command line but what about just clicking the .exe?

              DiracsbracketD mrjjM 2 Replies Last reply
              0
              • U user4592357

                @mrjj

                i was able to run the .exe from command line but what about just clicking the .exe?

                DiracsbracketD Offline
                DiracsbracketD Offline
                Diracsbracket
                wrote on last edited by Diracsbracket
                #7

                @user4592357
                I imagine you want to deploy your app maybe on machines that do not have Qt installed. Then you probably must use the windeployqt.exe tool as explained here: http://doc.qt.io/qt-5/windows-deployment.html

                The windeployqt.exe tool gives a list of all Qt DLL's your .exe needs, so, if you only intend to use your app on your PC, then you could instead make sure the path to all those DLLs is in your system path... Qt Creator does that for you when you launch the app from it, but if you directly click on the .exe without setting those paths, then the DLL's will not be found.

                I found the windeployqt.exe tool to be quite useful. It helped me solve an error about Qt5Multimediad.dll missing or so. The tool indicated that it was trying to find the .dll in an old Python directory in which I used to have a Qt installation. This old path E:/Python34/Lib/site-packages/PyQt5/ was still in my system PATH, which I did not realize. windeployqt.exe helped my solve that problem by showing the full path of the DLL it was trying to locate but couldn't find.

                1 Reply Last reply
                3
                • U user4592357

                  @mrjj

                  i was able to run the .exe from command line but what about just clicking the .exe?

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @user4592357
                  Its important to understand that clicking the exe demands that it has its support DLLS in same folder.
                  Its called a deployment folder. While its possible to add path so clicking the exe works, its
                  a very bad idea as other application might load wrongs dlls due to that.
                  So as @Diracsbracket says, you an use the tool to create such folder and run the exe from there.

                  DiracsbracketD 1 Reply Last reply
                  4
                  • mrjjM mrjj

                    @user4592357
                    Its important to understand that clicking the exe demands that it has its support DLLS in same folder.
                    Its called a deployment folder. While its possible to add path so clicking the exe works, its
                    a very bad idea as other application might load wrongs dlls due to that.
                    So as @Diracsbracket says, you an use the tool to create such folder and run the exe from there.

                    DiracsbracketD Offline
                    DiracsbracketD Offline
                    Diracsbracket
                    wrote on last edited by Diracsbracket
                    #9

                    @mrjj said in qmake: qtgui5.dll error:

                    While its possible to add path so clicking the exe works, its
                    a very bad idea as other application might load wrongs dlls due to that

                    I agree. Another solution is to create a script file (e.g. using VBScript) that sets up a temporary environment for your app, including all the paths it needs, and then launches your app. But all that of course is unnecessary if you only intend to use the app yourself: if your app is completed and only for personal usage, then its easier to create the deployment folder. If its for testing, then its simpler to launch it from Qt Creator anyway, so...

                    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