10.5 Executing Uninstalled Binaries

back: using convenience libraries
forward: installing a library
 
fastback: installing a library
up: introducing gnu libtool
fastforward: using gnu libtool
top: autoconf, automake, and libtool
contents: table of contents
index: index
about: about this document

10.5 Executing Uninstalled Binaries

If you look at the contents of the hello program you built in the last section, you will see that it is not actually a binary at all, but a shell script which sets up the environment so that when the real binary is called it finds its the shared libraries in the correct locations. Without this script, the runtime loader might not be able to find the uninstalled libraries. Or worse , it might find an old version and load that by mistake!

In practice, this is all part of the unified interface libtool presents so you needn't worry about it most of the time. The exception is when you need to look at the binary with another program, to debug it for example:

 
 $ ls hello     hello.lo   libhello.la   main.c   trim.lo hello.c   hello.o    libtrim.la    trim.c   trim.o $ libtool gdb hello GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.18 (hppa1.0-hp-hpux10.20), Copyright 1999 Free Software Foundation, Inc... (gdb) bre main Breakpoint 1 at 0x5178: file main.c, line 6. (gdb) run Starting program: /tmp/intro-hello/.libs/hello Breakpoint 1, main (argc=1, argv=0x7b03aa70) at main.c:6 6           return hello("World"); ... 

This document was generated by Gary V. Vaughan on May, 24 2001 using texi2html


GNU Autoconf, Automake and Libtool
GNU Autoconf, Automake, and Libtool
ISBN: 1578701902
EAN: 2147483647
Year: 2002
Pages: 290

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net