9.2. The Libtool Library
A Libtool library is built from Libtool objects in the same way that a native (non-Libtool) library is built from native objects. Building a Libtool library with libtool is as easy as building an old-style static archive. Generally, each of the sources is compiled to a Libtool object, and then these objects are combined to create the library.
Hands On
If you want to try this to see what libtool does on your machine, put the following code in a file 'hello.c' in a directory of its own, and run the example shell commands from there:
#include <stdio.h> void hello (who) char *who; { printf ("Hello, %s!\n", who); }
The traditional way to make a (native) static library is as follows:
$ gcc -c hello.c $ ls hello.c hello.o ...
Get GNU Autoconf, Automake, and Libtool now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.