help writing business module

Bill Gribble
02 Apr 2002 07:55:54 -0600

On Mon, 2001-11-12 at 11:26, Derek Atkins wrote:
> I'm trying to build a business module to plug into Gnucash,
> but I haven't figured out the new module system yet.  In particular
> I can't figure out what I need to do to:
> 	a) create the module, and
> 	b) get a test program to successfully find and use the module

The documentation for the module system is in

> Right now when I try my test program, I get the error:
> ** WARNING **: Failed to open module gnucash/business-core
> ** WARNING **: : could not locate gnucash/business-core interface v.0
> I've got a libgncmod-business-core.* located in
> src/business/business-core in the build tree.  I've not
> done a make install.

The name of the shared library file is not relevant.  If the directory
containing it is in the GNC_MODULE_PATH, any .la file will be tested to
see if it's a gnc-module and if so what the module name and version is. 

That warning indicates that there's no dlopenable .la file in the
GNC_MODULE_PATH which publishes version 0 of the module
"gnucash/business-core".  That could be due to any of several problems.
The most fundamental problems are that gnc_module_system_init either
never tried to open your library, tried to open it via lt_dlopen() but
lt_dlopen() failed, or opened it successfully but retrieved module name
and version information not compatible with what you asked for.  

The library would never be opened if the dir containing the module is
not in GNC_MODULE_PATH.  lt_dlopen will fail to open it if there are 
unresolved symbols in .la library or dependent libraries are not in
LD_LIBRARY_PATH. Cut and paste errors could cause the gnc_module name
and version information published by the module to be wrong.