Yippie-Ki-Yay
Yippie-Ki-Yay

Reputation: 22864

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.

Upvotes: 2

Views: 860

Answers (3)

Klaim
Klaim

Reputation: 69802

Jim Mischel answer is good(+1), but sometime you just need to have dll but still want to provide a unique exe in the end.

Then, tools like UPX comes to rescue...

Upvotes: 0

John Dibling
John Dibling

Reputation: 101506

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.

Upvotes: 4

Jim Mischel
Jim Mischel

Reputation: 134125

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.

Upvotes: 10

Related Questions