There are only two difficult aspects of a
library: 1)Why do you need a library? And what do you want to put in a library? As you see, these two
"difficult" aspects we mention have nothing to do with programming. We
can also state that we do not have an answer to either of these questions: it
will be up to you. What we will do here is to show HOW to create a library, not
why. We will also show how to include things in a library. We will not define
WHY you should put this function and not that one in a library because, from our
experience, it always depends on the programmer, the project, or a group of
people working on an application.
Libraries Characteristics |
|
A library is created and functions like a normal regular program, using
functions or other resources and communicating with other programs. To implement
its functionality, a library contains functions that other programs would need
to complete their functionality. At the same time, a library may use some
functions that other programs would not need. For this reason, there are two
types of functions you will create or include in your libraries. An internal
function is one used only by the library itself: the program that uses the
library, also called the client of the library, will not need access to these
functions. External functions are those that can be accessed by the clients of
the library.
There are two broad categories of libraries you will deal with in your programs:
static libraries and dynamic libraries. The process of creating each makes the
biggest difference, not necessarily their functionalities. Even so, there are
various techniques used to create each category (once again, we insist on
stating that the process of creating a library will be the least difficult of
your tasks).
|
|
|