Adding a Plug-In Interface

Doing It the Old-Fashioned Way

examples:
  $ autoreconf
  $ ./configure && make
  $ cd src
  $ ./jupiter
  Hello from ...jupiter!
  $
  $ ln -s modules/hithere/.libs/hithere.so module.so
  $ ./jupiter
  Hi there from ...jupiter!
Adding a Plug-In Interface

Converting to Libtool’s ltdl Library

  All exported interface symbols should be prefixed with modulename_LTX_
(e.g., hithere_LTX_get_salutation ).
  All remaining non-static symbols should be reasonably unique. The
method Libtool suggests is to prefix them with _modulename_
(e.g.,_jupiter_somefunction ).
  Modules should be named differently even if they’re built in different
directories.

examples:
  $ autoreconf -i -v
  $ ./configure --disable-shared && make
  ...
  $ cd src
  $ ls -1p modules/hithere/.libs
  hithere.a
  hithere.la
  hithere.lai
  $
  $ ./jupiter
  Hi there, from ./jupiter!
  $
  $ cd ..
  $ make clean
  ...
  $ ./configure && make
  $ cd src
  $ ls -1p modules/hithere/.libs
  hithere.a
  hithere.la
  hithere.lai
  hithere.o
  hithere.so
  $
  $ ./jupiter
  Hi there, from .../jupiter!