MS Visual C ++运行时库 - 为什么? [英] MS Visual C++ runtime library - what for?

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

问题描述

MS Visual C ++运行时库中有什么?我的意思是,我googled它,我总是找到的东西,如帮助,应用程序xxxx给我MS Visual C ++运行时库错误,没有解释。

What's in MS Visual C++ runtime library? I mean, I googled it, and I always found things like help, app xxxx gives me MS Visual C++ runtime library error, with no explanation.

我认为Windows C运行时库附带Windows?不是用VC ++?谢谢。

I thought that Windows C runtime libraries come with Windows? Not with VC++? Thanks.

编辑:
首先,感谢您的回答。我现在我不知道Windows中的运行时库。我的意思是,第一部分,Windows内部有它的win32 API等等,没关系,我知道。此外,Win32API来自内核和用户部分。

First, thanks for answers. I thing now I have bad idea of runtime libraries in windows. I mean, the first part, that Windows internally has its win32 API and so, that's OK, I knew it. Also, that Win32API are from kernel and user parts.

但我一直认为像GDI这样的函数被访问为DLL(我仍然相信他们是)。但我认为即使函数 printf 等等在一些Windows文件。

But I always thought that functions like GDI are accessed as DLL (which I still believe they are). But I thought even functions like printf and so are in some windows file.

所以,我知道得到这样的简单函数,如 printf 需要直接链接,而不是直接使用操作系统的内核部分,更复杂的Windows API函数链接为dll,因此,不是与编译器一起分发,但使用操作系统?他们随后访问Kernel?

So, am I right, when I know get it that "simple" functions like printf need to be linked directly and than use only Kernel part of OS directly, and more sophisticated Windows API functions are linked as dlls, therefore ARE NOT distributed with compiler but with OS? And they subsequently access Kernel?

我的意思是说,GDI,我告诉它绘制图片,它使所有的努力工作在用户模式,而不是调用内核函数

I mean, lets say GDI, I tell it to draw picture, it makes all the hard work in user mode and than call kernel function which puts it all in framebuffer?

最后一想,为什么这样解决这个问题?我的意思是,如果VC ++运行时只是C和WinAPI之间的层,为什么VC ++直接调用WinAPI?

And last thought, why is this even solved this way? I mean, if VC++ runtime is just layer between C and WinAPI, why cant VC++ call directly WinAPI?

推荐答案

MSVS C / C ++运行时实现像malloc / free,stdio,iostream和一些c ++的东西,像dynamic_cast和异常处理。这些不同版本的visual studio,因此有不同的运行时不同的版本。

A brief answer would be that the MSVS C/C++ runtime implements functions like malloc/free, stdio, iostream and some c++-stuff like dynamic_cast and exception handling. These differs between versions of visual studio, so there are different runtimes for different versions.

Windows船主要与C API(Win32 API),这是不同的C / C ++标准库。 MSVS C / C ++运行时调用这个API来分配内存等等。

Windows ship mostly with a C API (the Win32 API) which rather different from the C/C++ standard library. The MSVS C/C++ runtime calls into this API to allocate memory, etc etc.

(我认为Windows中包含的一些应用程序是用MSVS编写的,因此它们包括该版本的MSVS运行时。)

(I suppose some of the applications included with Windows are written with MSVS and in C++, so they do include the MSVS runtime for that version.)

此外,运行时随着新的Visual Studio版本的发布而改变。 Windows版本的持续时间要长得多。

Also, the runtime changes as new Visual Studio versions are released. A Windows release lasts much longer than that.

这篇关于MS Visual C ++运行时库 - 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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