From: June Lee on
why CRT for VC++ has to written in C

http://msdn2.microsoft.com/en-us/library/59ey50w6%28VS.80%29.aspx

is that because CRT is one level above the Win32 API ?

Win32 API is the lowest level on API that talk to hardware itself and
Win32 is written in C also

So it make more sense to write CRT in C too?
From: Scott McPhillips [MVP] on
"June Lee" <iiuu66(a)yahoo.com> wrote in message
news:3j3ov3dhgdqds3k9k8hkv0sft9v0afco03(a)4ax.com...
> why CRT for VC++ has to written in C
>
> http://msdn2.microsoft.com/en-us/library/59ey50w6%28VS.80%29.aspx
>
> is that because CRT is one level above the Win32 API ?
>
> Win32 API is the lowest level on API that talk to hardware itself and
> Win32 is written in C also
>
> So it make more sense to write CRT in C too?

CRT stands for C runtime library. It is written in C because it is part of
and defined by the C language.

This is not related to the Win32 API. In fact, the primary purpose of the
CRT is to make it possible to write programs that are platform-independent.
Such programs can be easily ported to other operating systems.

--
Scott McPhillips [VC++ MVP]

From: Carl Daniel [VC++ MVP] on
June Lee wrote:
> why CRT for VC++ has to written in C

It doesn't have to be written in C, it just happens that it is. It could
have been written in a suitable dialect of PL/I or Pascal or Assembly
language just as well. It's written in C primarily because it's convenient
for it to be so. Since we're talking about the C runtime library, it goes
without saying that there's a C compiler available, so why would one write
the CRT in any other language?

-cd


From: June Lee on
Then any C compiler will come with the CRT right?

for each OS - unix / windows / MAC ...

the C compiler / IDE will have CRT for C programmers?

It's similar to Visual C++ come with MFC library just for windows

>
>CRT stands for C runtime library. It is written in C because it is part of
>and defined by the C language.
>
>This is not related to the Win32 API. In fact, the primary purpose of the
>CRT is to make it possible to write programs that are platform-independent.
>Such programs can be easily ported to other operating systems.
From: Alex Blekhman on
"June Lee" wrote:
> Then any C compiler will come with the CRT right?
>
> for each OS - unix / windows / MAC ...
>
> the C compiler / IDE will have CRT for C programmers?
>
> It's similar to Visual C++ come with MFC library just for
> windows

Yes, every decent compiler is bundled with some CRT
implementation. The quality of the implementation may vary,
though.

MFC is a Microsoft proprietary library that helps you writing
Windows programs. It uses CRT a lot, too. MFC has nothing to do
with CRT, it's just another library. BTW, Visual C++ comes with
other Microsoft proprietary libraries: ATL and compiler COM
support classes.

Alex


 |  Next  |  Last
Pages: 1 2 3
Prev: static member
Next: reference