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. Environment Var Issue
Forum Updated to NodeBB v4.3 + New Features

Environment Var Issue

Scheduled Pinned Locked Moved Installation and Deployment
16 Posts 4 Posters 6.4k 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.
  • D Offline
    D Offline
    DWSwingle
    wrote on last edited by
    #1

    Hello,

    I am a brand new -QT- Qt user and having issues with running the .exe of the app I just created. Here is an image showing that the variable that the .exe is complaining about is in the directory that the path is set to. Is there something I'm missing? Thanks!

    !http://i55.tinypic.com/2utkqh2.png(screenshot of problem)!

    Edit: It is QT, not QT, as is explained in the text in the top; Andre

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      You need to make sure that all the library files that your application depends on can be found by the application. One way (not the only one) is to copy all these files to the same directory as your executable. the mingw dll is one of those, but so are the Qt dlls for the modules your application uses. Note that your screen shot shows the build settings, not the run settings. These may or may not be the same.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DWSwingle
        wrote on last edited by
        #3

        I just slowly added the .dll that gave errors until i got to this point. Thank you for moving the thread to an appropriate category.

        !http://i56.tinypic.com/dy82af.png(Image)!

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          I think you have picked the wrong version of the Qt dlls. Note that your SDK installation contains (at least) two versions. You need the one from here: C:\Qt\SDK1.1\Desktop\Qt\4.7.3\mingw\bin (depending on where you installed Qt your path may differ of course, of course.)

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DWSwingle
            wrote on last edited by
            #5

            I just pulled all of them from that directory and seem to be getting the same thing. :(

            !http://i54.tinypic.com/25fox09.jpg(SC)!

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

              Can you try running Dependency Walker on your application to see which dependencies your application has? You can post a screenshot of the dwi file here if you want us to take a look at the dependencies.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DWSwingle
                wrote on last edited by
                #7

                Ok I ran dependency walker on the .exe if that is correct and got this:

                !http://i54.tinypic.com/ibxtzc.png(pic)!

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #8

                  Ok, so it looks like your MSVC redistributables are not found. Find these files (correct verions), and put them in a place your application can find them.

                  However, could you check what compiler toolchain you are actually using? It seems that you are using MSVC after all, and not mingw. You can check that in the Project tab in Creator.

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    giesbert
                    wrote on last edited by
                    #9

                    [quote author="Andre" date="1304400423"]Ok, so it looks like your MSVC redistributables are not found. Find these files (correct verions), and put them in a place your application can find them.[/quote]

                    No, MSVCRT is normally found via the manifest, so inside the winsxs directory, when the dll is build via MSVS tool chain. Also it would be interesting, on which way the msvcrt comes into the game, so which dll depends on it?

                    Then open the manifest of the file (it can be extracted using mt.exe or using MSVS) and check the needed version of the msvcrt.

                    Nokia Certified Qt Specialist.
                    Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sigrid
                      wrote on last edited by
                      #10

                      Can you also check the View/Full paths option in Dependency Walker? That way you will be able to see the full path of the Qt dlls, and can see if the correct ones are being picked up. Can you post a screenshot with the full paths? When looking at your current screenshot, then it looks like the incorrect QtGui is being picked up because it has a different link time than the QtCore one. The one for QtGui is before Qt 4.7.3 was released. The problem seems to be that QtCore and QtGui do not match, but if you show the full paths then this will be more visible.

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        DWSwingle
                        wrote on last edited by
                        #11

                        !http://i56.tinypic.com/2pr6wee.png(loot)!

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          DWSwingle
                          wrote on last edited by
                          #12

                          !http://i56.tinypic.com/av32vs.png(paths)!

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            giesbert
                            wrote on last edited by
                            #13

                            Hi,

                            I think your problem is, that you have QtCreator in the path, before your current Qt version you use. You see it, as the QtGui comes from:

                            c:\qtsdk\qtcreator\bin\qtgui4.dll, your QtCore comes from c:\users...

                            try putting all QtLibs you need beside your executable.

                            Nokia Certified Qt Specialist.
                            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              sigrid
                              wrote on last edited by
                              #14

                              Or you can put the Qt version in c:\users...first in your global PATH and restart Qt Creator, that should ensure that the correct Qt dlls are being picked up. Then ensure you are using the "Qt in PATH" option in QtCreator.

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                DWSwingle
                                wrote on last edited by
                                #15

                                Apparently my "Qt in PATH" isn't found?

                                !http://i51.tinypic.com/6se4o4.png(path)!

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  sigrid
                                  wrote on last edited by
                                  #16

                                  Did you add yourQtVersion/bin first to the global PATH in your Control Panel/System/ Advanced System Settings/Environment Variables? And then restart Creator after having done 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