英文:
Is MSVC Redistributable a runtime library or a dynamic library?
问题
我注意到了以下内容:
-
微软文档:Microsoft Visual C++ Redistributable 的最新支持下载,C 运行时 (CRT) 和 C++ 标准库 (STL) 的
.lib
文件 -
stackoverflow:什么是 C 运行时库?
这里提到运行时库不应与程序员创建的库或由第三方提供的库混淆,也不应与动态库混淆。
在微软的文档中,它说 MSVC Redistributable 是一个运行时库,还说 crt 包含从标准 C99 CRT 库导出的函数和全局变量(这不是运行时库的一部分定义,对吗?)。
但我发现很多文章都说 MSVC Redistributable 是一组动态库文件。
我可以问一下 MSVC Redistributable 究竟是什么吗?
英文:
I noticed these pieces of content:
-
Microsoft documentation: Microsoft Visual C++ Redistributable latest supported downloads, C runtime (CRT) and C++ standard library (STL)
.lib
files -
stackoverflow: What is the C runtime library?
It is mentioned here that runtime libraries should not be confused with libraries created by programmers or provided by third parties, nor with dynamic libraries.
In Microsoft's documentation, it says that MSVC Redistributable is a runtime library, and it also says that crt contains functions and global variables exported from the standard C99 CRT library (This is not part of the runtime library definition, is it?).
But I found very many articles that say MSVC Redistributable is a set of dynamic library files.
May I ask what exactly is MSVC Redistributable?
答案1
得分: 1
MSVC Redistributables是C(以及在较小程度上C++*)标准库的特定实现,以及一些重要VC组件(MFC/ATL)的类似构建。它们提供了由语言标准规定的库功能的具体实现,以及一些MS特定的功能。Microsoft以一种合法的形式提供这些库,您可以将其与您构建的二进制文件一起使用,这就是它们被称为"redistributable"的原因。请注意,只有动态库的发布构建受到覆盖,您无法在任何情况下合法地包括动态库的调试形式或静态库。
*我之所以说C++的程度较小,是因为C++标准库的很大部分是以模板的形式存在的,这些模板在编译时由编译器评估,而不是以标准形式编译后发货。
英文:
The MSVC Redistributables are particular implementations of the C (and to a lesser extent C++*) standard libraries, as well as similar builds of some important VC components (MFC/ATL). They provide concrete implementations of the library functionality dictated by the language standards, along with some MS-specific functionality. Microsoft makes these libraries available in a form that you can legally include with binaries you have built, that is why they are called "redistrubatable". And note that only the release builds of the dynamic libraries are covered, you cannot legally include either the debug form of the dynamic libraries or the static libraries at all.
- I say lesser extent for C++ because very much of the C++ standard library is in the form of templates that are evaluated at build-time by the compiler, rather than anything that can be shipped compiled in a standard form.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论