Linking the shared library against the loadable module

Derek Atkins warlord at MIT.EDU
Tue Sep 6 14:00:59 EDT 2005

Yea, GnuCash's previous developers wanted gnucash to be a bunch of Loadable
Modules..  But they never finished the modularlization, and they didn't
understand the difference between a Shared Library and a Loadable Module.

It's part of the brokenness of the current gnucash module architecture.  There
is no simple fix.  It's unclear whether just removing the -module will 
solve the problem.  It may be a short-term fix...

In the end, we really need to rethink the modularization effort, and how we
build our application.  What parts REALLY need to be modules, and how do they
link against the core code?


Quoting Neil Williams <linux at>:

> Just revisiting this:
> This turns out to be one of the problems getting CVS GnuCash to compile on
> MacOSX. So whereas it's only a warning on GNU/Linux, it halts the build on
> OSX.
> The fix is to remove LDFLAGS=-module line in the's in these
> folders:
> src/app-utils/
> src/core-utils/
> src/gnc-module/
> src/gnc-module/test/*
> src/engine/
> src/backend/file
> src/network-utils/
> src/network-utils/test/
> src/tax/us/
> Where LDFLAGS is also used for GWRAP, just removing the -module prefix from
> the line is sufficient.
> Followed by a make clean before make.
> From other projects, this appears to crop up if you move from LDFLAGS to
> DYNAMIC_FLAG - could that be the problem?
> I can find few references to what LDFLAGS=-module actually does, except this
> one:
>> And a last question, what's the difference between a MODULE and a SHARED
>> lib ? Is MODULE intended to be used for plugins ?
> This is mainly used for Mac OSX where there is a distinction between
> modules (.so) and shared libraries (.dylib).  Modules on OSX can link to
> libraries but nothing can link to modules.  They are meant for plugins.
> Seems strange to me.
> Any clues as to what's going on?
> --
> Neil Williams
> =============

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

More information about the gnucash-devel mailing list