[sword-devel] Sword.exe: statically linked win32 vs dynamic dll

Lynn Allan sword-devel@crosswire.org
Mon, 27 Oct 2003 00:02:04 -0700


Inquiring (newbie) minds want to know:
* Is the Win32 version of sword.exe (3.5 meg) statically linked?
* If so, could it be split into sword.exe and swordlib.dll to facilitate
"small foot-print plug-ins"?

My impression is that this subject has been discussed in the past. However,
I've seen mentions of sword.dll (or swordlib.dll?), but that file doesn't
seem to be distributed any longer with the end-user 1.5.6 "starter kit."

I'm attempting to "port" the freeware InVerse Scripture memorization program
to use sword as a source of verses. Currently, it preloads 15,000+ verses,
which accounts for about 90%+ of the 960kb InVerseSetup.exe. The actual code
is MFC, and is about 102kb (uncompressed before setup ... probably about
50kb compressed in the setup).

My impression is that the Win32 version of sword.exe is statically linked.
I've used VisualStudio98 to build diatheke.exe and ActiveDiatheke.ocx, and
am gradually getting a surface understanding of what the code is doing.
There release versions end up being 400kb and 540kb, respectively (without
ICU).

So far, it appears that InVerse could use the relatively bare-bones
"RawText" interface to the Bible texts. It doesn't have any need of the
installation manager, filters, or even SwModule. Still, that static link of
InVersePlusSword.exe is going to be much larger than I'd prefer: perhaps
400kb to 500kb.

>From the perspective of InVerse, a preferred situation would be for
sword-32.exe to be in two (or more) parts. There would be the swordlib.dll
which InVerse could use to access Bible text, and sword.exe which would also
dynamically linked to swordlib.exe. Sword.exe + Swordlib.dll would still be
about 3.5 meg combined, and InVerse.exe could be less than 120kb.

TIA for any feedback to this suggestion. I acknowledge that I'm not all that
knowledgable about dynamic and static loading, and the suggestion I'm
advocating may be inappropriate or impractical.

Lynn Allan aka paraclete@bibleinverse.org