February 14, 2012

chocolate1146 chocolate1146
Lab Rat
5 posts

Error: “The program can’t start because QtGuid4.dll is missing from your computer…”

 

Hi all!

I’m newbie in forum. I try to develop apps (console or GUI) run in windows by use Qt Creator 2.4.1. When I run project (Ctrl+R) it work, but when I run executable file in debug folder it does not work. Error occurs: “The program can’t start because QtGuid4.dll is missing from your computer. Try reinstalling the program to fix this problem.”

I found topic [developer.qt.nokia.com] and try do follow it.
First: copy “QtGui4.dll” into debug folder and rename it to “QtGuid4.dll” then run exe file again. The error occurs same except dll missing is “QtCored4.dll”.
Second: same the first, copy “QtCore4.dll” and rename it to “QtCored4.dll” then run exe file again. The error occurs same, in this case dll missing is “QtCore4.dll”.
Third: copy “QtCore4.dll” to debug folder and run exe file again. It work.

Conclusion: copy 3 dll files “QtCore4.dll”, “QtCored4.dll” (rename from “QtCore4.dll”) and “QtGuid4.dll” (rename form “QtGui4.dll”) to debug folder. It work.

So, how to built my app can run in windows without copy 3 dll files to same directory? I don’t want that because size of dll files fairly large (“QtGui4.dll” ~ 7.84Mb and “QtCore4.dll” ~ 2.18Mb (x2)).

Thanks for advance!

Best regards!

ps: I downloaded the QtSDK (Qt4) for install offline (1.3Gb). OS: Windows 7 Ultimate.

14 replies

February 14, 2012

steno steno
Ant Farmer
238 posts

If you run the executable from the folder, you have to have the dll’s in that folder. When you run it from the IDE, the IDE knows where to look for those dll’s through the project settings.

February 14, 2012

Jake007 Jake007
Lab Rat
264 posts

All dll files are located in [your_QtSDK_install_dir]\Desktop\Qt\[your_Qt_version]\mingw\bin

Just search for dlls that error reports and copy it to your application directory.

Note:
If your change the build to release, you won’t need debug libraries, which are quite larger.

 Signature 

——————————————-
Code is poetry

February 15, 2012

chocolate1146 chocolate1146
Lab Rat
5 posts

Thanks for reply!

Jake007 wrote:
All dll files are located in [your_QtSDK_install_dir]\Desktop\Qt\[your_Qt_version]\mingw\bin

Just search for dlls that error reports and copy it to your application directory.

Note:
If your change the build to release, you won’t need debug libraries, which are quite larger.

How to build to release? I try to run, build or qmake but nothing change.

February 15, 2012

Anticross Anticross
Ant Farmer
279 posts

You need to choose release in your IDE and than make build. In Visual Studio it’s a list box when you can choose release or debug and than press F7 to build your application.

February 15, 2012

chocolate1146 chocolate1146
Lab Rat
5 posts

Thank for reply!

Anticross wrote:
You need to choose release in your IDE and than make build. In Visual Studio it’s a list box when you can choose release or debug and than press F7 to build your application.

I try choosee release in Qt Creator: Projects -> Targets -> Build -> Build Settings and choosee Edit build configuration to “Qt 4.8.0 for Desktop – MSVC2008 (Qt SDK) Release” and rebuild then goto release folder to run exe file. But error occurs same, require “QtGui4.dll” and “QtCore4.dll” to run exe. How to attack just lib, what my app need (for example: import QLabel without import all elements of QtGui4.dll lib) in itself (executable file). Then my app can run in some pc without “move” dll files (eg: QtGui4.dll, QtCore4.dll) follow it.

Thanks for advance!

February 15, 2012

Jake007 Jake007
Lab Rat
264 posts

QLabel is inside QtGui. So you can not have them separately.

Jake007 wrote:
All dll files are located in [your_QtSDK_install_dir]\Desktop\Qt\[your_Qt_version]\mingw\bin

Just search for dlls that error reports and copy it to your application directory.

Then you only repeat this step.

There is a way to bypass dlls, but you would need to buy Qt license for this.

Also, if you copy your dll files in C:\Windows\system32\, you won’t need to copy dlls any more.
But if you’ll distribute you app, don’t forget to add dlls. But there might come a problem with different Qt versions in time.

 Signature 

——————————————-
Code is poetry

February 15, 2012

waterstw waterstw
Lab Rat
3 posts

The other option is to add the bin directory with the dls etc. to your PATH environment variable. start->right-click on computer->properties->advanced system settings->environment variables. Then modify the PATH to include the directory with your qt dl’s (something like [QtSDK_install_dir]\qt\bin).

However, for deployment to another computer, you will still need to copy all of the dll’s

February 16, 2012

chocolate1146 chocolate1146
Lab Rat
5 posts

Thanks!

waterstw wrote:
The other option is to add the bin directory with the dls etc. to your PATH environment variable. start->right-click on computer->properties->advanced system settings->environment variables. Then modify the PATH to include the directory with your qt dl’s (something like [QtSDK_install_dir]\qt\bin).

However, for deployment to another computer, you will still need to copy all of the dll’s

Don’t have any way? If copy all of the dll into same directory of executable then my app so larger and every one can know my app written by Qt. I don’t want that.

February 16, 2012

steno steno
Ant Farmer
238 posts

If you were to ship your product with Qt to a customer, you would have to put the dll’s in the folder where the app is installed. There is no way around that. You don’t want the responsibility to be placed on the user to make sure they install the Qt library in the proper location. Also, the release libraries are small. For example, QtGui4.dll is roughly 8.16MB, which is nothing in terms of size. Only copy the dll’s that you use, I’m guessing you only use QtGui4.dll and QtCore4.dll.

February 16, 2012

chocolate1146 chocolate1146
Lab Rat
5 posts
steno wrote:
If you were to ship your product with Qt to a customer, you would have to put the dll’s in the folder where the app is installed. There is no way around that. You don’t want the responsibility to be placed on the user to make sure they install the Qt library in the proper location. Also, the release libraries are small. For example, QtGui4.dll is roughly 8.16MB, which is nothing in terms of size. Only copy the dll’s that you use, I’m guessing you only use QtGui4.dll and QtCore4.dll.

Thanks!

July 22, 2013

LeeMinh LeeMinh
Lab Rat
50 posts

HI chocolate1146, When I copy QtCore4.dll and QtGui4dll to excute folder . It has still show QtCore4.dll is missing. I make another solution by copy it to debug folder – it contain .exe file. It don’t show QtCore4.dll is missing. It show icuin51.dll IS MISSING.

June 2, 2014

harshit_smart harshit_smart
Lab Rat
7 posts

I am facing exactly the same problem.. i tried to run the calculator example exe from Qt Creater ,it works and when i try to run from the folder it asks for the dll files…
The dll file are really very heavy if i want to run this calculator in another computer just as an example…
And if theres not any work around….a calculator of 100 Mb…..what the heck is that … who will want to use any of my app…if i build on qt..

Pls help

June 2, 2014

harshit_smart harshit_smart
Lab Rat
7 posts

for this the dll files for calculator exe is exactly 70,2 mb..are you sure it needs to be so big to run a calculator in another computer???

steno wrote:
If you were to ship your product with Qt to a customer, you would have to put the dll’s in the folder where the app is installed. There is no way around that. You don’t want the responsibility to be placed on the user to make sure they install the Qt library in the proper location. Also, the release libraries are small. For example, QtGui4.dll is roughly 8.16MB, which is nothing in terms of size. Only copy the dll’s that you use, I’m guessing you only use QtGui4.dll and QtCore4.dll.

June 6, 2014

Sid Sid
Ant Farmer
88 posts

Dear LeeMinh,

“It show icuin51.dll IS MISSING.”

I think you are using QT5 and not Qt4. To resolve this issue just copy the same icuin51.dll from QT installation folder to the folder where your exe is present.

Let me know in case you feel any problem.

Cheers!

 
  ‹‹ [Resolved] Mac Build machine (10.5) - needs to produce app that runs on 10.5, 10.6 and 10.7      Creating matrix of label in constructor ››

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