[sword-devel] Mingw and SWORD's internal regex (was: Re: 1.6.1 outstanding items? )

Matthew Talbert ransom1982 at gmail.com
Mon Dec 7 17:52:53 MST 2009

I just tried building with Mingw/MSYS. The check for Mingw still
doesn't work, which means SWORD's internal regex isn't compiled.

./lib/.libs/libsword.a(swmodule.o):swmodule.cpp:(.text+0x2267): undefined refe
nce to `regcomp'
./lib/.libs/libsword.a(swmodule.o):swmodule.cpp:(.text+0x2b11): undefined refe
nce to `regexec'
./lib/.libs/libsword.a(swmodule.o):swmodule.cpp:(.text+0x2c7c): undefined refe
nce to `regfree'

Of course, I personally don't want SWORD's regex anyway, but still it
should by default compile without errors.

Also, to actually build a dll with Mingw when you have built with
clucene support, it is necessary to pass the flag -no-undefined in
$LIBS. It would be nice if that were done automatically so someone new
at this could have everything "just work". In newer versions of gcc
this won't be necessary, but it still is in the versions most commonly

So, the desired behavior would be, if using mingw with
--enable-shared, LIBS="-no-undefined".


More information about the sword-devel mailing list