April 29, 2011

DWSwingle DWSwingle
Lab Rat
9 posts

Environment Var Issue

 

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!

screenshot of problem

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

15 replies

April 29, 2011

Andre Andre
Area 51 Engineer
6031 posts

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.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

April 29, 2011

DWSwingle DWSwingle
Lab Rat
9 posts

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.

Image

April 29, 2011

Andre Andre
Area 51 Engineer
6031 posts

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.)

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

April 29, 2011

DWSwingle DWSwingle
Lab Rat
9 posts

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

SC

April 29, 2011

sigrid sigrid
Lab Rat
144 posts

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.

May 3, 2011

DWSwingle DWSwingle
Lab Rat
9 posts

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

pic

May 3, 2011

Andre Andre
Area 51 Engineer
6031 posts

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.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

May 3, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts
Andre wrote:
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.

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.

 Signature 

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

May 3, 2011

sigrid sigrid
Lab Rat
144 posts

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.

May 3, 2011

DWSwingle DWSwingle
Lab Rat
9 posts

loot

May 3, 2011

DWSwingle DWSwingle
Lab Rat
9 posts

paths

May 4, 2011

Gerolf Gerolf
Area 51 Engineer
3210 posts

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.

 Signature 

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

May 4, 2011

sigrid sigrid
Lab Rat
144 posts

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.

May 5, 2011

DWSwingle DWSwingle
Lab Rat
9 posts

Apparently my “Qt in PATH” isn’t found?

path

May 6, 2011

sigrid sigrid
Lab Rat
144 posts

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?

 
  ‹‹ Qt SDK 1.1 RC missing lots of libs from the Symbian SDK      SLED 11 SP1, run qt4 OpenGl examples ,Error:lack glu.h ››

You must log in to post a reply. Not a member yet? Register here!