On Mon, 29 Dec 2003 14:50:57 +0800, Wittson
As you were told, the "standard" library is a set of functions
specifed by international standards. Everyone knows exactly what the
set of functions includes and what they are supposed to do.
People (or corporations) who produce compilers ordinarily have their
own sets of library functions that help you do certain tasks,
especially those used in accessing features of the operating system or
features peculiar to your specific hardware platform. In addition,
there are routines essential to starting up your program that need to
be linked in with your code. For example, your code begins with a
main() function. Who calls main? The startup code does. At least
some of these routines are needed for your program to run. Hence,
some compiler manufacturers may choose to call at least one of their
libraries the "runtime" library. Since there is no standard for those
functions or for that library, whoever named it could call it by any
name and put anything they want into it. In other words, it doesn't
mean anything except what the person who created it meant.
Yes, if your program needs startup code (and every program does,
whether you know it or not) you need to link in the appropriate
library. If your program uses any of the non-standard functions
supplied by your compiler manufacturer, you need to link in the
appropriate library or libraries. If your program uses any of the
standard library function, you need to link in the appropriate library
or libraries. There is no standard name for any of these. Every
compiler manufacturer has their own set of libraries and library
names. My copy of Microsoft VC++ contains over 30 libraries that may
be needed for particular purposes and I only installed a limited set
of them! The "Platform SDK" from Microsoft has over 200 libraries.
Your compiler documentation tells you exactly which libraries you need
to link. Usually the documentation for each library function
specifies the name of the library required.
If you use the program development tools that come often come with
your compiler (like Visual Studio for Microsoft VC++) then you usually
don't have to worry about linking -- it is done automatically for you.
The tools also give you a way to specify exactly which libraries are
linked. Read the documentation.