[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.
-
You can read about it in "this article":http://developer.qt.nokia.com/doc/qt-4.7/deployment-windows.html#id-4dd365a0-4e08-4810-9d5b-5be62a8baaca
-
Hello dvez43,
I dealt with this problem some weeks ago and I found a fast solution. You should:
- Go to the directory: QtSDK\QtCreator\bin
- Select all the libraries you need (.dll)
- 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.Regards,
Sebastian -
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...
-
Thank you very much for your replies! I will test this.
-
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!