Re: Clear doubts regarding the C++ Runtime



ritesh wrote:

> Hi,
>
> I have been reading some text on C and C++ (i.e advanced books). One
> of the books mentioned that C++ requires a runtime support whereas C
> does not - what the author was trying to say was that once you compile
> a C program the executable created is all that is needed whereas if you
> compile a C++ program the executable created requires a C++ runtime
> installed on your system to run the program.
>
> Can someone please provide more information on this or could provide a
> link to some webiste where this concept is explained in detail. I
> would like to know the differences in C and C++ compiled code which
> makes a runtime necessary for one and not for the other.
If you mean that it is usual to link shared libraries (such as .so or .dll),
that is true of both C and C++, but C++ requires more of them. 20 years
ago, C implementations which supported only static linking were more common
than now. Static linking will inflate the size of a C++ build much more
than a C build. Reasons for the differences are surely not topical on
c.l.c.
--
Tim Prince
.