December 14, 2011

dvez43 dvez43
Ant Farmer
241 posts

[SOLVED] “Can’t start because QtGui4.dll is missing from your computer”


I am developing on windows in debug mode. When I build my application, and go to the built folder in debug, this error occures when trying to open the exe.

“the program can’t start because qtgui4.dll is missing from your computer, Try reinstalling the program to fix this problem”.

Any idea what is going on, or has anyone seen this before?

P.S. I downloaded the QtSDK (Qt4) online and installed it directly. I am using the QtCreator to develop.

5 replies

December 15, 2011

p-himik p-himik
Lab Rat
235 posts

You can read about it in this article []

December 15, 2011

Seba Seba
Ant Farmer
107 posts

Hello dvez43,

I dealt with this problem some weeks ago and I found a fast solution. You should:

1) Go to the directory: QtSDK\QtCreator\bin
2) Select all the libraries you need (.dll)
3) Copy them to your programs folder

This should work. Anyway, the proper way is the one described above by p-himik.
Hope this helps you.


December 15, 2011

Andre Andre
Robot Herder
6422 posts

The approach indicated by Seba84 works, and is quite reasonable I think. I use it all the time. The underlying problem you have is that when you start your application from within Qt Creator, the environment variables (paths and stuff like that) are different then when you start your application directly. That means that in that last scenario, the application cannot find the libraries (they are not in your path) that it could find when starting from Creator. Because the current directory is always a valid search path, putting the DLL’s there always works. And it is one way to avoid DLL hell…

December 16, 2011

dvez43 dvez43
Ant Farmer
241 posts

Thank you very much for your replies! I will test this.

January 3, 2012

dvez43 dvez43
Ant Farmer
241 posts

The method you stated is working. I started working on another project but had to come back to this issue. I added my Qt library directory to the environment variable PATH. Works like a charm now. Thank you!

  ‹‹ [Solved] When do menus show for dialogs?      Styling QToolBox’s title ››

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