0

I have a Qt application (Win x64 download here http://api.straw-solutions.cz/?action=downloadSoftware&productKey=lumen&platform=win_x86_64 ). When I tried to publish it, I got an echo that when starting the aplication, it prompts that MSVCR120.dll is missing. It is, however, possible to press ok and the application starts without problems.

This does not really make sense to me, as the application was build with MSVC2017. I've walked the dependencies for the app and the plugins and couldn't find msvcr120. I've also tried removing the msvcr120.dll from my system and start the application and it started fine.

Also please note that I bundle and install VS2017 runtime with the application.

Danol
  • 368
  • 1
  • 15
  • Maybe related to how Qt libs were built... What is your Qt version? How did you install Qt? – talamaki Jul 25 '18 at 09:32
  • Qt 5.11.0, standard installer – Danol Jul 25 '18 at 09:33
  • If you deploy applications built with any version of VS/VC++, you need to provide runtime libraries with your binaries. These can be downloaded from MSDN: [Visual Studio-Downloads](https://visualstudio.microsoft.com/downloads/) (search for "redist"). My experience: As a lot of Windows S/W probably is developed with VS, these redistributables may already be available except in the few cases where you install your S/W on a rather new/clean PC. So, you might not notice immediately if you forgot the redists. – Scheff's Cat Jul 25 '18 at 11:33
  • If I remember correct, the redist package of MSDN is an installer which you can bundle with yours. (The redistributables are installed in a central location using a so-called side-by-side thingy-dingy which allows different versions of the same DLLs to co-exist - probably to resolve 32 bit vs. 64 bit issues). – Scheff's Cat Jul 25 '18 at 11:39
  • Some years ago, when I stumbled myself over this redist issue, I tried to copy the resp. MSVS DLLs into my binary dir. For anything else, this was a good idea - for GTK+/gtkmm it was even recommended - but it didn't help for the MSVS DLLs. While I tried to solve it I learned about the redists. – Scheff's Cat Jul 25 '18 at 11:41
  • I have bundled MSVC with my application, but since I've built it with 2017, I've bundled MSVC2017. Why should I bundle other runtimes? – Danol Jul 25 '18 at 11:47
  • You didn't address me but I assume - it's in reply to my above comments. - When you compile and link your application in VS2017 then you get dependencies to the runtime DLLs of VS2017. `MSVCR120.dll` sounds to me like such a runtime DLL. From my experience, storing the VS runtime DLLs into the install directory (together with any other EXE and DLL of your application) doesn't work. Instead you have to ensure that the redist package for VS2017 is always installed together with your S/W. – Scheff's Cat Jul 25 '18 at 11:53
  • Found the resp. doc. on MSDN: [Determining Which DLLs to Redistribute](https://learn.microsoft.com/de-de/cpp/ide/determining-which-dlls-to-redistribute). – Scheff's Cat Jul 25 '18 at 12:02
  • I bundle and run the VS2017 runtime installer with the application. – Danol Jul 25 '18 at 12:41
  • Stupid question (as I don't have any other idea): Did you notice the choice between _x64_ and _x86_ next to the Download button? Your appl. is compiled for x64, and you provide the redist for _x64_, do you? – Scheff's Cat Jul 25 '18 at 18:07
  • I do. (this text is only to fulfill the minimum message length for stack overflow) – Danol Jul 25 '18 at 22:02

1 Answers1

1

I've discovered the problem lies in OpenSSL libraries I have provided with the applicaiton. The libraries were compiled with older MSVC and did not show in the dependency tree because they were loaded dynamically after start. Downloading matching OpenSSL binaries fixed the issue.

Danol
  • 368
  • 1
  • 15