From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/LIBRARIES/libraries.html | 107 +++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 reference/C/LIBRARIES/libraries.html (limited to 'reference/C/LIBRARIES/libraries.html') diff --git a/reference/C/LIBRARIES/libraries.html b/reference/C/LIBRARIES/libraries.html new file mode 100644 index 0000000..bdc66fc --- /dev/null +++ b/reference/C/LIBRARIES/libraries.html @@ -0,0 +1,107 @@ + + +User created libraries/archives + + + + +
+
+

User created libraries/archives

+
+
+

+ +Wot is a user library? I hear you ask! Well, its a collection of your +functions, that, when placed into a library are available to all the programs +you write.

+This is what +Chris Sawtell +has to say about libraries. +

+There are two types of library, dynamic +and static. Although dynamic libraries +are the prefered alternative (because they are not linked +into your program), here is the method required to create +static libraries.... +

+There are several steps required in creating a library.

+

+
+Here are the four steps in UNIX terms. The function is called reverse +and the library is called mart. +

+

+ + +
+
+
+ vi reverse.c			     # write your function (no main). 
+ gcc -c reverse.c		     # -c just compiles (no link).
+ ar -q  libmart.a reverse.o	     # -r == if nessasary replace 
+         			     #       an existing function.
+ gcc program.c -lmart -L/home/leslim # -l == library to search
+				     # -L == Location of the library.
+
+
+
+

+ +A few notes:

+

+
+Other usefull commands: + +

+


+

See Also:

+ + + + +

+ +


+

+

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ + -- cgit v1.2.3-54-g00ecf