[sword-devel] Building Python binding to Sword on Windows returns exit code 1

Greg Hellings greg.hellings at gmail.com
Wed May 14 10:55:17 MST 2014

On Tue, May 13, 2014 at 3:56 PM, Greg Hellings <greg.hellings at gmail.com>wrote:

> On Tue, May 13, 2014 at 3:48 PM, R Johnson <
> ps16thypresenceisfullnessofjoy at gmail.com> wrote:
>> Thanks, Greg and Ben.
> If we could get that working, it would be great! Unfortunately, I don't
>> have any experience with CMake either (in fact, I had never heard of it
>> until I started trying to build Sword). But I'm willing to learn, and will
>> try to do what I can.
>> Following the instructions in some of the Sword README files, I was
>> successfully able to create a VS2010 project for Sword with CMake (with the
>> argument -DSWORD_BINDINGS="Python" added). But when I tried to build the
>> Visual Studio project that it created, I got several errors. The output
>> from the attempted build was 1625 lines, but many of them were not fatal
>> errors, just warnings. I used a regex to remove all the warnings, and have
>> attached the resulting file.
>> It appears that the problem is that two header files cannot be found:
>> 'dirent.h' and 'inttypes.h'. As far as I can tell, the former is in the
>> Sword repository, but the latter is not (but is mentioned, along with
>> HAVE_INTTYPES_H, in 'config.h.in' in the 'include' directory). The fatal
>> errors that I got afterwards are likely caused by the previous builds
>> failing, I think. Perhaps the problem could be fixed by simply adding these
>> files to the correct directory?
> dirent.h is present in most Linux/Unix environments but is absent in
> windows environments. There is an appropriate flag we will need to enable
> in CMakeLists.txt to tell SWORD to use the bundled dirent.h file. I believe
> it's just a matter of setting the appropriate include directory when
> building with MSVC (dirent.h is available when cross-compiling from MinGW
> but that doesn't really help the MSVC/Python case).

I've gotten past this compile error and identified a second one that Troy
fixed (actually a known bug in MSVC that we created a workaround for). Now
I need to fix its detection of dependent library include/link paths.


> I'll have to look into inttypes.h - it's probably an issue with finding
> the appropriate compiler flags to set. I know that Sword builds with and
> supports MSVC as there is a native MSVC build file that works fine with
> VS2010. So it's just a matter of garnering from it to figure out what CMake
> needs to do.
> --Greg
>> Also, since the C# project solution file is unmaintained, do you think it
>> would be a good idea to remove it from the repository? If that was done, it
>> wouldn't cause confusion for other Sword newbies in the future like it did
>> me.
>> Thank you for your help.
>> -- Timothy
>> _______________________________________________
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140514/8e0e7289/attachment.html>

More information about the sword-devel mailing list