Rajju
Rajju

Reputation: 357

Distributing raw msvcp.dll or installing vc_redist.exe

Deploying an app compiled with MSVC, should I include msvcp140.dll and vcruntime140.dll copy-pasted from VC folder with other .dll's, or distribiute vc_redist.exe installer, installing environment on each user computer?

What is the 'right' approach, and why?

Upvotes: 0

Views: 145

Answers (1)

Wander3r
Wander3r

Reputation: 1881

There is no thumb rule or "right approach" for this scenario, rather pros and cons of choosing one over other. In my opinion, this depends on how the product/file is being deployed.

  • If the file is not getting installed (extracted from a zip or runs before the installer), then placing the necessary redist in the same file is good enough. May be statically linking is better (?)
  • If everything is getting installed via an installer, then installing the redistributables is cleaner way of doing this. There are already merge modules available to integrate with installer or even standalone executables

Won't recommend placing the necessary files in the folders where installer could be run as it's easier to maintain/update the redist files with each newer version ( of compilers and product)

Upvotes: 1

Related Questions