The files in this directory are part of an example project with a dynamically
loaded OMX module called "adder" included in the WORKSPACE_1 library.

The WORKSPACE_1 library would be defined in v/templ.v as:

   flibrary WORKSPACE_1<NEeditable=1,dyn_libs="mymods"> {
      module adder<src_file="adder.cxx",out_src_file="xp_adder",
		   out_hdr_file="xp_adder.h"> {
         cxxmethod+req update(
            .input1+read+notify+req,.input2+read+notify+req,.result+write);
         int input1<export=2,NEportLevels={2,0}>;
         int input2<export=2,NEportLevels={2,0}>;
         int result<NEportLevels={0,2}>;
      };
   };

The source files here: adder.cxx, xp_adder.cxx and xp_adder.h, are essentially
no different than the equivalent source for a module whose method is linked
statically (or implicitly) into express.  When dynamic loading this method
is not linked into the express process, instead it is built as a separate
shared library (by the user) that gets dynamically loaded by the Object
Manager when the update method of the adder module is to be run.

Note that the mymods library is automatically excluded from express by
the AVS/Express project generation process.

The Makefile in this directory is a rough template for building the shared
library: the use of $(DLFLAGS) within it may cause warning messages, these
can be cleaned up as necessary.  The important goal is to get the
appropriate link flags for building the shared library (these vary from one
UNIX version to another).

Also note that on HP systems the standard extension for a shared library is
.sl, not .so.  There is no need to add an extension to the library named in
the dyn_libs library property (see v above): the Object Manager automatically
adds the standard extension for the platform if no extension is given.

This example can be used by creating a project directory, copying the files
here to that directory, changing v/templ.v appropriately, changing
"<xp_proj_dir>" in the Makefile to be the project directory, running the base
process to generate express.mk and express and then generating mymods.so
by typing "make".

Note that mymods.so can be rebuilt at any time while the express process is
running providing it is not in use by any module (delete any instances of the
adder module before rebuilding).  In this way a module can be developed and
be part of the express process without having to stop and restart that
process.

Please see the AVS/Express documentation for more information.

