Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcopy installation of Visual C++ 2008 runtime

Is it possible to make my C++ application run on a machine without Microsoft Visual C++ 2008 Redistributable Package by simply including some dlls in the program folder?

I want to make my app as portable as possible and want to avoid forced installation of the runtime, so is it possible?

I don't care about possible future runtime .dll update and other troubles related, I simply want to supply my app with everything that it could possibly need (on every Windows XP+ machine). Did someone face the same problem?

Thank you.

like image 311
Yippie-Ki-Yay Avatar asked Dec 04 '25 15:12

Yippie-Ki-Yay


2 Answers

Actually, you can link with the static runtime libraries and you won't need to redistribute any of the runtime DLLs. Check the documentation or the Visual Studio help for details on how to link with the static runtime libraries.

like image 106
Jim Mischel Avatar answered Dec 08 '25 07:12

Jim Mischel


Yes, you can, but it's a little tricky to get all the dependencies right. It's not quite as simple as just "drop msvcrt.dll in to this folder and go." I've done what you're trying to do. It's not worth it.

For reference, see here

If you want to balance keeping your code small and reducing client-side dependancies, you may want to consider statically linking to the VC runtime.

like image 25
John Dibling Avatar answered Dec 08 '25 07:12

John Dibling



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!