code in cvs is broken

Bill Gribble
02 Apr 2002 07:56:12 -0600

On Wed, 2001-11-14 at 08:26, Derek Atkins wrote:
> For the record, the business modules that I'm working on do NOT
> link against or the GC Gnome UI libraries,
> but they still work fine when loaded into the GC runtime:

IMO, it's just an accident that your modules load.  They are badly
formed if they don't link against all the things that they depend on. 

Each gnc-module should be self-contained.  That is, this script should
load your business module and anything else it needs: 

  (use-modules (gnucash gnc-module)
  (gnc:module-load "gnucash/business-module" 0)

and the trivial C program 

  #include <stdlib.h>
  int main(int argc, char ** argv) { exit 0; }

should be able to link against just your module's .la file without
having any undefined symbols.  These tests are generally called
'test-link-module' and 'test-load-module' in the existing source tree. 

If you don't link against all the things you need, that script will fail
or the program will not link. 

Now if you are saying that your modules don't have any linkage
dependencies on anything else, that's great.  I encourage that!  but
please remember that modules are supposed to be reusable and
self-contained, and if you do have linkage dependencies on another
library, you should express that.