devopsfun
devopsfun

Reputation: 1418

When vcredist 2017 is needed?

I have a C++ project, compiled with Visual Studio 2017. Earlier, it was compiled with Visual Studio 2015 and it was shipped with vcredist 2015.

When I now want to ship the library, which is now compiled with Visual Studio 2017, do I definitely should ship it with vcredist 2017?

Alternative question: Under which condition I need to ship my library with vcredit 2017?

Upvotes: 1

Views: 227

Answers (2)

Florian Zwoch
Florian Zwoch

Reputation: 7403

You always have to ship your compiled application with the redist of the compiler version that has been used.

Exception is when you compile your application with the static versions of the runtime - which basically means the redist is present in your application already.

If any other dependencies are compiled with the dynamic runtime you still need to ship with the redist.

Upvotes: 1

Jari Komppa
Jari Komppa

Reputation: 604

Open Developer Command Prompt for Visual Studio. Go to the folder which contains your binaries. Run:

dumpbin /imports yourprogram.exe | find "dll"

You can do the same for a .dll if that's your build target. If the result contains any of the visual studio 2017 DLLs (MSVCP140.dll, VCRUNTIME140.dll etc) then your program requires the DLLs to run, and thus the redist.

Upvotes: 1

Related Questions