Skip to content

libtool: static shared libraries and debugging

robertjharrison edited this page Mar 26, 2016 · 1 revision

These notes describe how the configure options control how shared/static libraries are built/used if configuring using autoconf (which internally uses libtool)

  • by default both the static and shared libraries are built (which doubles the compilation time) and the shared libraries are used for linking

  • you can disable building of the shared libraries using --disable-shared which reduces the compilation time and forces static linking against our libraries (I recommend to everyone using autoconf that they do this)

  • you can disable building of the static libraries using --disable-static which also reduces the compilation time and forces shared linking against our libraries

  • you can attempt to force static linking of all libraries using --enable-all-static but that will likely fail since you likely won't have static libraries for most of the system calls, etc.

  • if you want to debug a libtool executable (which is really a script that loads the shared libraries and invokes the actual executable which is buried in the .lib directory) do libtool --mode=execute gdb nameofexecutable

Clone this wiki locally