Take the 2-minute tour ×

When I run the program from IDE (VS2008) it works perfectly. When I want to launch it from Windows Commander it doesn't work because it needs DLL that wasn't found. Used both debug and release builds.

share|improve this question

4 Answers 4

up vote 1 down vote accepted

Make sure the Qt DLL's are in your PATH. Two simple solutions are:

  • Copy Qt's DLL's to your EXE's directory.
  • Copy Qt's DLL's to %WINDOWS%\System32 (e.g. C:\WINDOWS\System32) (possibly unsafe, especially if you install another versions of Qt system-wide. Also, requires administrative privilages).
share|improve this answer
thanks a lot, now it`s OK! –  chester89 Jan 25 '09 at 18:57
I recommend do not copy to system32, just put to the application root directory. strager's #2 –  abatishchev Jan 25 '09 at 19:30
Or add the directory where the DLLs are located to your PATH –  andreas buykx Jan 25 '09 at 19:30
abatichev is right. Copying to system32 can invite all kinds of trouble. –  Drew Dormann Jan 25 '09 at 20:07
Thanks for the note, abatishchev. I've edited my answer to note that. –  strager Jan 25 '09 at 20:11

You should make sure that the DLLs needed by the executable (probably QT Dlls) are in the PATH or in the same directory as the executable. You can find which dlls are needed by using depends.exe

share|improve this answer

another solution would be to place path to qt bin subdir in VS tools->options->projects and solutions->VC++ directories.

share|improve this answer

You could link it statically with all the libraries it needs. Saves messing around with DLLs and stuff. On the down side, you can't update DLLs on your installed PCs to get updated/improved/fixed functionality, and will need to rebuild and redeploy.

So whether or not this is viable depends on what your installation targets are - a few PCs controlled by you, or every man+dog who decides to download your program?

Statically compiling in a library bug (security hole for example) and shipping that to your clients would be very poor form. Doing the same on a secure corporate intranet may make it worth doing just so that you know that each install is running exactly the same.

share|improve this answer

Your Answer


