Question

I have a QT app which uses a LIB that depends on the 2008 C++ MSVCR90.dll. When I deploy my app, on some computers the following error is presented: screenshot

how can I solve this issue? someone mentioned to me that if I include a manifest file, this should help. so I prepared the following manifest file:

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="*" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

in the .pro file I've added the following:

CONFIG += embed_manifest_exe
win32:CONFIG(release, debug|release) {
 QMAKE_POST_LINK = $$quote(C:/Program Files (x86)/Windows Kits/8.1/bin/x64/mt.exe -nologo -manifest \"ISHEmulauncher.exe.manifest\" -outputresource:$(DESTDIR_TARGET);1)
 }
 else:win32:CONFIG(debug, debug|release) {
 QMAKE_POST_LINK = $$quote(C:/Program Files (x86)/Windows Kits/8.1/bin/x64mt.exe -nologo -manifest \"ISHEmulauncher.exe.manifest\" -outputresource:$(DESTDIR_TARGET);1)
 }

but the manifest that is created is different from the one I prepared and does not include the VS90 dependency and therefor I'm still facing the same error.

any suggestions? thanks!

Was it helpful?

Solution 2

I solved the problem by unchecking the "shadow build" option in QT. after that, the manifest file I defined wasn't ignored and the library was loaded correctly.

OTHER TIPS

Redistributables are pretty annoying to manage. Typically what I have needed to do is to run the MSVC C++ redistributable installer on every deployment machine (as part of the install process) to avoid this error.

The article here may shed some light on the situation:

http://msdn.microsoft.com/en-us/library/ms235299(v=vs.90).aspx

https://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html#application-dependencies

I have tried to get the right dll's off my development machine and just deploy it into my application's folder. If you don't mind having another step in your installer of installing the redistributable package, the links below should help.

http://www.microsoft.com/en-us/download/details.aspx?id=29

http://www.microsoft.com/en-us/download/details.aspx?id=26368

Also if your app is compiled for 32 bit, you only need the 32 bit redistributables. If you compiled your app in x64, then you need the 64 bit redistributables.

Related:

Qt5 Deployment on Windows

Hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top