[sword-devel] building with mingw
Matthew Talbert
ransom1982 at gmail.com
Mon Apr 27 12:38:23 MST 2009
Thanks Troy.
There is one other thing with MinGW, that I just figured out, but
don't really know how to apply. In order to build a dll, gcc needs to
have "-no-undefined" passed to the linker. In addition, I configured
with lt_cv_deplibs_check_method=pass_all which may not be necessary,
I'm not sure yet. I don't know how to add these to the right places,
so I'm doing this:
LIBS="-no-undefined" CPPFLAGS="$CFLAGS CPPFLAGS -DUSBINARY"
./configure lt_cv_deplibs_check_method=pass_all $OPTIONS $*
At any rate, the -no-undefined is certainly necessary. I don't know if
that is easy to add or not. The current tests that try to decide if
the platform is MinGW don't work, so I'm not sure that adding this to
that check would work. Perhaps for the moment (considering the release
schedule), the above line could simply be added as a comment in
./usrinst.sh or a readme, or a readme.msys or something? Most of the
people who are trying to build with MinGW are probably reading this
list, so I realize it isn't terribly critical.
With the exception of a regex problem, everything works out-of-the-box
to build a static lib. It would be nice if the above mentioned test
(for MinGW) worked, which is supposed to cause building and linking
with local regex. I would prefer to link against a newer regex
library, so it isn't a big deal to me but others trying to build the
library will have this problem.
Anyway, I realize that it is late to be bringing up issues like this.
I don't intend that they should be seen as "showstoppers". I just
today figured out how to build a dll successfully, so I'm just passing
it on.
Matthew
On Mon, Apr 27, 2009 at 3:02 PM, Troy A. Griffitts <scribe at crosswire.org> wrote:
> Applied. Thanks Matthew.
>
>
> Matthew Talbert wrote:
>>
>> The following patch is necessary to build with MinGW (gcc 4.3.3).
>> Without it, SEEK_END is undefined. I haven't tested this on linux, but
>> it looks harmless.
>>
>>
>> Index: src/modules/lexdict/rawld/rawld.cpp
>> ===================================================================
>> --- src/modules/lexdict/rawld/rawld.cpp (revision 2349)
>> +++ src/modules/lexdict/rawld/rawld.cpp (working copy)
>> @@ -26,6 +26,8 @@
>> #include <rawld.h>
>> #include <filemgr.h>
>>
>> +#include <stdio.h>
>> +
>> SWORD_NAMESPACE_START
>>
>>
>> /******************************************************************************
>> Index: src/modules/lexdict/zld/zld.cpp
>> ===================================================================
>> --- src/modules/lexdict/zld/zld.cpp (revision 2349)
>> +++ src/modules/lexdict/zld/zld.cpp (working copy)
>> @@ -25,6 +25,8 @@
>> #include <zld.h>
>> #include <filemgr.h>
>>
>> +#include <stdio.h>
>> +
>> SWORD_NAMESPACE_START
>>
>>
>> /******************************************************************************
>> Index: src/modules/lexdict/rawld4/rawld4.cpp
>> ===================================================================
>> --- src/modules/lexdict/rawld4/rawld4.cpp (revision 2349)
>> +++ src/modules/lexdict/rawld4/rawld4.cpp (working copy)
>> @@ -26,6 +26,8 @@
>> #include <rawstr4.h>
>> #include <rawld4.h>
>>
>> +#include <stdio.h>
>> +
>> SWORD_NAMESPACE_START
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
More information about the sword-devel
mailing list