要发布哪些运行时库? [英] Which runtime libraries to ship?

查看:33
本文介绍了要发布哪些运行时库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio 2008 处理 C/C++.我相信我并不关心我的代码正在使用哪些运行时库,因为我有开发人员设置.但是当可执行文件发布时,正在使用的运行时库需要一起发布.我说得对吗?

I work on C/C++ using Visual Studio 2008. I believe that I am not concerned about which runtime libraries are being used by my code as I have the developer setup. But when the executable is shipped, the runtime libraries being used need to be shipped alongwith. Am I right?

如果是,我如何确定实际使用了哪些共享库?或者有没有我们可以在不知道这一点的情况下发布的库?

If yes, how can I identify which shared libraries are actually getting used? Or are there any libraries that we can ship without having to know this?

推荐答案

您说得对,您需要发布与您链接应用程序的版本相匹配的 C 运行时库版本.如果您使用 Visual Studio 2008 进行编译,那么您想使用 Microsoft Visual C++ 2008 Redistributable Package.正如其他人提到的,您可以检查应用程序的清单文件,以准确了解它链接到的 C 运行时库版本.

You're correct, you need to ship a version of the C runtime libraries that matches the version you linked your application against. If you're compiling with Visual Studio 2008, then you want to use the Microsoft Visual C++ 2008 Redistributable Package. As other folks mentioned, you can inspect your application's manifest file to see exactly which version of the C runtime libraries it's linked against.

在发货之前,最好将您的产品安装在干净的(即非开发人员)虚拟机上并运行 Microsoft 的 Dependency Walker 实用程序,用于验证您的应用程序是否使用了正确的 C 运行时库.

Before shipping, it's always best to install your product on a clean (i.e., non-developer) virtual machine and run Microsoft's Dependency Walker utility to verify that your application uses the correct C runtime libraries.

这篇关于要发布哪些运行时库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆