xcopy 安装 Visual C++ 2008年运行时

发布于 2024-09-25 10:16:31 字数 327 浏览 3 评论 0原文

是否可以通过简单地在程序文件夹中包含一些 dll 来使我的 C++ 应用程序在没有 Microsoft Visual C++ 2008 Redistributable Package 的计算机上运行?

我想让我的应用程序尽可能便携,并希望避免强制安装运行时,那么这可能吗?

我不关心未来可能的运行时 .dll 更新和其他相关问题,我只是想为我的应用程序提供它可能需要的一切(在每个 Windows XP+< /代码> 机器)。有人遇到同样的问题吗?

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

失去的东西太少 2024-10-02 10:16:31

实际上,您可以链接静态运行时库,并且不需要重新分发任何运行时 DLL。有关如何链接静态运行时库的详细信息,请查看文档或 Visual Studio 帮助。

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.

战皆罪 2024-10-02 10:16:31

是的,可以,但是要正确设置所有依赖项有点棘手。它并不像“将 msvcrt.dll 放入此文件夹中然后继续”那么简单。我已经做了你想做的事。这是不值得的。

有关参考,请参阅此处

如果您如果想要平衡保持代码较小和减少客户端依赖性,您可能需要考虑静态链接到 VC 运行时。

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.

ら栖息 2024-10-02 10:16:31

Jim Mischel 的答案很好(+1),但有时你只需要 dll,但最终仍然想提供一个唯一的 exe。

然后,诸如 UPX 之类的工具来拯救......

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...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文