[sword-devel] How do you make the Sword framework work in 64bit mode? (My compiler is giving me hundreds of warnings.)

Manfred Bergmann manfred.bergmann at me.com
Fri Oct 14 04:15:20 MST 2016

I’m also having tons of warnings when compiling SWORD in Xcode for 64 bit.
The precision warnings can be ignored IMO. But due to the sheer number of warnings it’s very hard to detect warnings that shouldn’t be ignored.

Btw: there is a Objective-C wrapper for the SWORD library under bindings/objc which I maintain and use in Eloquent.
AFAIK some form of the wrapper in used in PS.
It would be great if efforts could be shared in using only one codebase.


> Am 13.10.2016 um 22:30 schrieb TS <outofthecube at icloud.com>:
>      So, Xcode gives me hundreds of warnings when I try to build for 64 bit mode. I've also tried searching the mailing list so I see that some people earlier in the year may be have seen the same warnings (for PocketSword), so I think I better understand why I've seen that some of the libraries were updated(I don't know if all were updated or ?). However, I'm still getting errors and some of it is in the Sword framework. My impression so far of what's going on is that Xcode is telling me is that there are datatypes which are not being converted properly. I think this is happening due to things like "int" and "long" not occupying the same amount of space or something like they use to do in 32 bit and so need a casting in order to be converted properly?
>      An example is listkey.h at line 147 in which "index" is a "long", but then setToElement is for an "int".
>      Another is swbuf.h at line 448 "...const { unsigned int psize = strlen(postfix); ..." where Xcode warns that there's a loss of precision. That an unsigned long is converting to an unsigned int. I think that unsigned long occupies 64 bits when run in 64 bit mode, but the int stays in 32 bits when run in 64 bit mode.
>     I have compared the Sword framework that it's using against the last stable one and there's doesn't seem to be changes to address the issues I'm seeing.
>     Any suggestions on how to proceed?
> -TS
> _______________________________________________
> 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/20161014/da49dded/attachment.html>

More information about the sword-devel mailing list