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. [Solved] Set environment variable for QT SDK (.dll file missing)
QtWS25 Last Chance

[Solved] Set environment variable for QT SDK (.dll file missing)

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 5 Posters 22.3k 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.
  • Z Offline
    Z Offline
    Zain
    wrote on last edited by
    #1

    Hello all,

    I am a newb for QT , just downloaded the QT SDK for windows 7.
    It seems working fine when I debug any program from the IDE, but when I run any project exe (from release or debug folder) It shows message for so many .dll files are missing.

    I think I need to set some environment variables for it.
    I don't know what and how will I do it?
    If I am right then please let me know the settings for it. Or any other Ideas for the problem of .dll file missing.

    Thanks in advance

    Zain

    1 Reply Last reply
    0
    • S Offline
      S Offline
      soundar
      wrote on last edited by
      #2

      you can download the missing dll files and put it into qtsdk library directory.I think it may work.Ohterwise you can install latest version.

      Don't Follow Anyone but You Must Learn From Everyone.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on last edited by
        #3

        You are having problems running your code from the command line, is that correct?

        Check the run configuration creator uses (Projects->Run Settigns). There is a section there called "Run Environment", which shows the environment reator uses to run your applicaiton. Make sure your command line is using a similar environment. On windows the PATH variable is usually the most critical.

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          Zain
          wrote on last edited by
          #4

          Thanks for the replies,

          Please suggest me to set the 'PATH and the variables'.

          Is there any specific variable which I need to create?
          I saw a similar kind of example on the internet, but don't know how practically I will do it?

          Well thanks again, I will try your suggestions . :)

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rahul Das
            wrote on last edited by
            #5

            How are you running your application ??

            By clicking the executable ?? Or from inside the SDK-> creator -> run itself?


            Declaration of (Platform) independence.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sidewinder
              wrote on last edited by
              #6

              As Tobias wrote PATH is most important. You can set it to bin directory in Qt installation directory (where all dlls sit). Ex. If you install Qt to c:\qt\4.8.2 then add c:\qt\4.8.2\bin to path.
              How to do that? Check "this":http://www.windows7hacker.com/index.php/2010/05/how-to-addedit-environment-variables-in-windows-7/

              "Never memorize what you can look up in books."
              Albert Einstein

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                Zain
                wrote on last edited by
                #7

                @Tobias and Rahul, I am running the programs from IDE(QT creator) by clicking the run and debug buttons(Working) but when I run the programs from the debug or release folder executable all go in vein.

                @Tobias,I have not tried it from command prompt, however I tried your suggestion and the environment is set to 'build environment'.

                @sidewinder, I have installed the QT SDK and below are the PATHs I have tried to set in the path variable, nothing worked (Suggest If I got it wrong and things are not like this):

                C:\MinGW\bin;
                C:\QtSDK\QtCreator\bin;
                C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin;
                C:\QtSDK\Madde\bin;
                C:\QtSDK\QtCreator\bin;

                Please tell me if this is not the way to solve the issue:
                What have I missed ? Is there something wrong with my installation ? It is all set to the default locations and I haven't changed anything.

                Thanks for your efforts :)

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sidewinder
                  wrote on last edited by
                  #8

                  bq. C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\bin;

                  This one should work. Have you logout -> login after setting PATH? Restarting explorer process should also work. To be certain - reboot :).

                  "Never memorize what you can look up in books."
                  Albert Einstein

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    Rahul Das
                    wrote on last edited by
                    #9

                    So, what i understand is, Your application is working form within the SDK. But your executable is not finding the dlls when you try to run .

                    If it is so, you might want to go through the" deployment documentation. ":http://doc.qt.nokia.com/4.7-snapshot/deployment-windows.html

                    You might need to keep qtcore4.dll,qtgui4.dll in the folder folder where exe resides or set the library path in code.

                    Edit:
                    Or you can set the PATH variable to the Qt - dll folder.


                    Declaration of (Platform) independence.

                    1 Reply Last reply
                    0
                    • Z Offline
                      Z Offline
                      Zain
                      wrote on last edited by
                      #10

                      Hey sidewinder and Rahul both suggestion worked.

                      Thanks a lot :)

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        Rahul Das
                        wrote on last edited by
                        #11

                        You're welcome :)

                        Please edit the post-title as "Solved" :)


                        Declaration of (Platform) independence.

                        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