Proper way to deploy a Qt application on windows (runtime libraries)
-
Hi,
I have a Qt application that that mainly targets the windows platform.It was working great on windows8,7 and XP machines until yesterday when the the development system got its windows7 update.After that update,i can build and run the application on any machine that has visual studio installed but can't run it on a machine without it.I get the following error.
xxxxxxxxx has encountered a problem and needs to close. We are sorry for the inconvenience.
What is puzzling me is that the system has been working for more than 5 months without problems and my previous builds are working fine.
I followed "this guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html to deploy my application. and included the runtime dlls with the executable of my application.Those are(msvcm90.dll,msvcp90.dll and msvcr90.dlll ) as i am using vc2008 to compile.
Some threads are talking about the embed manifest thing but I am not very familiar with what it does.
Can any of you more experienced folks point me in the right direction as to what might be the problem?Any help will be appreciated.
NOTE:I am using Qt 4.8.1 vc2008 and building on windows7.
-
bq. To install the runtime libraries on the end-user's system, you need to include the appropriate Visual C++ Redistributable Package (VCRedist) executable with your application and ensure that it is executed when the user installs your application.
have you done this?
-
Hi,
Just a quick idea, but if the update modified VS you might have to rebuild Qt in order to have both the libraries and your application built with the same compiler/service pack etc…
Hope it helps
-
Thanks guys for your replies,
@NicuPopescu:
I have downloaded the vcredist_x86.exe and installed it on the xp target machine and I still see the same error,Is there anything else I need to do prior to installing ? (Also the approach to put the mscvcp dlls in the same directory as the app executable should work right? I don't want the users to have to deal with more install overhead).[quote author="SGaist" date="1384430751"]Hi,
Just a quick idea, but if the update modified VS you might have to rebuild Qt in order to have both the libraries and your application built with the same compiler/service pack etc…
Hope it helps[/quote]
This is the option that I am going to try ,just a stupid question,does this mean that I have been lucky before to have the libraries and compiler match correctly for my application to work?I have downloaded an Qt 4.8.1 SDK for vs 2008 and including the runtime dlls with the executable just worked.
Thanks again for the response.
-
Not specially lucky, but when Microsoft updates their development tools (does update relates to dev tools) they have a tendency to break things