1 Attachment(s)
error when running the "release" executable
Hi,
Using Qt Creator, my program works fine when I set the build configuration to debug. When I set the build configuration to release mode, it also works fine, but then when I try to run my program from the .exe file in the "release" folder, I get the following error message:
Quote:
This application has failed to start because QtCored4.dll was not found. Re-installing the application may fix this problem.
(as shown in attachment)
Presently I would like to make it so that any windows machine only needs to run a single executable file in order for my program to work..
Thanks
Re: error when running the "release" executable
You have to add your Qt bin ddirectory to the windows path (assuming you're using windows and have done the default installation it will be C:\Qt\2009.05\qt\bin).
Other solution, for deploying your application on another machine, it will be to copy the necessary dll's to the same file.exe directory (typically with will be qtcore4.dll, qtgui4.dll, anf if you using mingw, mingwm10.dll and libgcc_s_dw2-1.dll)
Re: error when running the "release" executable
Quote:
Originally Posted by
Ferric
Using Qt Creator, my program works fine when I set the build configuration to debug. When I set the build configuration to release mode, it also works fine, but then when I try to run my program from the .exe file in the "release" folder, I get the following error message:
Either you are mistaken or you have a configuration error as Qtcored4.dll is the debug version of the Qt libraries. For release mode you should be linking against Qtcore4.dll.
To get your application working on another PC, you need to copy the QtCore4.dll and any other libraries you need (eg. QtGUI4.dll) into the system path or your programs working directory.
Re: error when running the "release" executable
Quote:
You have to add your Qt bin ddirectory to the windows path (assuming you're using windows and have done the default installation it will be C:\Qt\2009.05\qt\bin).
yes, I am using windows XP and I did the default installation. How do I add the Qt bin directory to the windows path?
Thanks
Re: error when running the "release" executable
Quote:
Originally Posted by
Ferric
Hi,
Presently I would like to make it so that any windows machine only needs to run a single executable file in order for my program to work..
To completely avoid the need to ship runtime DLLs with your application you will need to statically link Qt into it. There are licensing implications when you distribute the resulting executable.
If the "single executable file" can be a self-installer then you can bundle the relevant runtime libraries with your application inside the installer.
Re: error when running the "release" executable
Quote:
Originally Posted by
Ferric
yes, I am using windows XP and I did the default installation. How do I add the Qt bin directory to the windows path?
Thanks
http://www.computerhope.com/issues/ch000549.htm