[sword-devel] Problems compiling swordlib with vc6 and vc7.1

L.Allan-pbio paraclete at bibleinverse.org
Wed Jul 12 11:56:21 MST 2006


With swordlib revision 1945, I'm encountering these problems using 
Microsoft vc6 and vc7.1:

*******************************
*******************************

swbuf.h line 28
#ifdef WIN32
#include <mem.h>
#endif

There is no mem.h, so this fails. It turns out that mem.h isn't 
needed, so these three lines can be removed.

*******************************
*******************************

osiswordjs.cpp has "newer-style conforming" C++ code that breaks "not 
so great at conforming" vc6
// line 85:
for (int i = 0; i < count; i++) {
  statements ....
}
// line 147
for (int i = 0; i < wordID.size(); i++) {
  statements ....
}

This breaks vc6, so it no longer is a supported build environment. 
This is the only place this is used, so it isn't much of a burden to 
"fix". The work around is to revert to older-style C++ code and use:
// line 85:
int i;
for (i = 0; i < count; i++) {
  statements ....
}
// line 147
for (i = 0; i < wordID.size(); i++) {
  statements ....
}

*******************************
*******************************

Also, swsearchable.cpp reports undefined type 'ListKey'.
The fix is to have:
#include <swsearchable.h>
#include <listkey.h>

SWORD_NAMESPACE_START

*******************************
*******************************

Also, the vcproj file for vc8 is in:
lib\vcppmake\vc8\csharp
which seems somewhat out of place.
(I made a quick try to compile with Express-2005 vc8, but it appears 
that some or all of the files are misplaced)

*******************************
*******************************

If it would help, I can try to remember how to use svn and submit a 
patch file.



More information about the sword-devel mailing list