help writing business module

Derek Atkins warlord@MIT.EDU
12 Nov 2001 13:10:07 -0500


Bill Gribble <grib@linuxdevel.com> writes:

> The documentation for the module system is in
> src/gnc-module/doc/design.txt. 

Ahh, there it 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.

Ok, it looks like GNC_MODULE_PATH was part of the issue.  It's now
finding all my scheme.  But it also looks like I need to reference the
.libs directories directly in LD_LIBRARY_PATH in order to find the .so
files properly.  Otherwise I get an error like:

ERROR: In procedure dynamic-link:
ERROR: libgw-business-core.so: cannot open shared object file: No such file or directory

> b.g.

But it appears I now have a module that I can load; or at least I can
use "make check" and it seems to find everything and run my
(non-existant) tests.  Cool.  Now I get to write some tests to see if
my code actually works :)

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available