gpt4 book ai didi

c++ - 分发 Visual C++ 运行时库 (MSVCRT)

转载 作者:太空狗 更新时间:2023-10-29 21:30:40 25 4
gpt4 key购买 nike

我有一个使用 Visual Studio 2008 开发的 ATL/WTL 项目,到目前为止,我一直在静态链接 CRT 库,避免发布它们。但是,我现在需要考虑改用动态库 (DLL) - 为了减少代码的大小,因为我想使用优秀的 crashrpt工具(需要动态链接到 CRT。)

现在,MS 提供了独立安装程序 (vcredist_x86.exe) 和 MSM 软件包,但这对我来说并不好,原因有二:

  • 我没有使用基于 MSI 的安装程序(我使用的是 InnoSetup)。
  • 我的应用程序安装在受限用户帐户上,vcredist_x86.exe 安装程序无法运行。

因此我想发布 CRT DLL,然后安装在我的应用程序文件夹中。现在,这是你可以做的事情,因为我找到了 following blog post MSVC 库开发负责人 Martyn Lovell 说:

However, if you want to install-applocal, you should make sure that your application has a manifest, and then copy the whole of this folder into your EXE directory:

X:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT

and other folders if you use more than the CRT. Make sure you include the manifest.

只是想要我追求 - 除了我不明白这部分:

make sure that your application has a manifest

我的问题是 - 如何创建引用我要使用的 CRT DLL 的应用程序 list ?我的项目当前使用的唯一 list 信息如下(确保应用程序使用公共(public)控件的 v6):

/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"

有人可以向我提供有关如何使用 Visual Studio 2008 发挥 list 魔法的说明吗?我的 Visual Studio VC\redist\x86\Microsoft.VC90.CRT 文件夹中有一个 Microsoft.VC90.CRT.manifest 文件 - 我需要以某种方式使用它吗?

注意:这是一个与 this one 相似但不同的问题。 .

最佳答案

当您传递/MD 标志时,Visual Studio 将为您生成正确的 list 。

关于c++ - 分发 Visual C++ 运行时库 (MSVCRT),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2131093/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com