libtool Command Examples

A generic library support script that hides the complexity of using shared libraries behind a consistent, portable interface. More information: https://www.gnu.org/software/libtool/manual/libtool.html#Invoking-libtool.

libtool --mode=compile gcc {{[-c|--compile]}} {{path/to/source.c}} {{[-o|--output]}} {{path/to/source.lo}}

libtool --mode=link gcc {{[-o|--output]}} {{path/to/library.lo}} {{path/to/source.lo}}

libtool --mode=execute gdb {{path/to/program}}

libtool --mode=install cp {{path/to/library.la}} {{path/to/installation_directory}}

libtool --mode=finish {{path/to/installation_dir}}

libtool --mode=uninstall {{path/to/installed_library.la}}

libtool --mode=clean rm {{path/to/source.lo}} {{path/to/library.la}}