October 2000
Intermediate to advanced
432 pages
9h 9m
English
Continuing the parallel between the syntax used to compile with libtool and the syntax used when building old static libraries, linking an executable is a matter of combining compilation units into a binary in both cases. We tell the compiler which objects and libraries are required, and it creates an executable for us.
Hands On
If you want to try this to see what libtool does on your machine, put the following code in a file 'main.c' in the same directory as 'hello.c' and 'libhello.la', and run the example shell commands from there:
void hello ();
int
main (argc, argv)
int argc;
char *argv[];
{
hello ("World");
exit (0);
}To compile an executable that uses the non-Libtool 'libhello.a' library built previously, I ...
Read now
Unlock full access