本文介绍了为什么需要 Visual C++ Redistributable Package?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果可视化 C++ 编译器编译的代码是直接的 C++,为什么还需要可再发行包?这是否使您的代码平台依赖?与使用其他 IDE 和 g++ 相比,将 Visual C++ 编译器与可再发行包一起使用是否有任何优势?

If the code compiled by a visual C++ compiler is straight C++, why do you need a redistributable package? Does this make your code platform dependant? Does using the visual C++ compiler with the redistributable package provide any advantage over using another IDE along with g++?

推荐答案

代码不依赖于平台,生成的可执行文件是.它通过标准库实现链接到 MS 库,这些库作为 DLL 包含在可再发行组件中.

The code is not platform dependent, the resulting executable is. It is linked against the MS libraries with the standard library implementation, that are included in the redistributable as DLL's.

IIRC 应该有一个用于静态链接所有内容的选项,这样您就不需要额外的可再发行组件,但生成的二进制文件仍将取决于平台 - 例如,您不能在 UNIX 系统上运行 Windows 二进制文件(至少没有 WINE).

IIRC there should be an option for static linking of everything, so that you wouldn't need the additional redistributable, but the resulting binary would still be platform dependent - for example you can't run a windows binary on a UNIX system (without WINE at least).

这篇关于为什么需要 Visual C++ Redistributable Package?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 08:43