Thank you all for your replies and suggestions.

      I could go in to more detail, but here’s a summary breakdown of the 
warnings and what they connect to. (There are 3 warnings included in all this 
which I am aware of which are not necessarily 64 bit related)

Summary:
- There are 96 warnings found in files inside of the CLucene (clucene/CLucene) 
folder
- There are 185 warnings which are in the externals/sword folders.
- There are 32 warnings which are in the externals/CocoaHTTPServer folder.
- There are 10 warnings which are in the Classes folder. These seem to be
  written especially for PocketSword and are not part of libraries or 
frameworks.

     From what I’m seeing so far, all the warnings are mostly repeating 
variations of the same thing which is that there is a datatype which in 64 bit 
runtime is a 64 bit quantity and the code is assigning it to an “int” value 
which is a 32 bit quantity. The data type “long” is a 64 bit quantity, for 
example, and so a warning is thrown every time it’s assigned to an “int” 
datatype which remains a 32 bit quantity when running in a 64 bit runtime. 
Here’s a link which shows Apple’s documentation regarding how their data types 
change based on the 32 or 64 runtime. 

https://developer.apple.com/library/content/documentation/General/Conceptual/CocoaTouch64BitGuide/Major64-BitChanges/Major64-BitChanges.html
 
<https://developer.apple.com/library/content/documentation/General/Conceptual/CocoaTouch64BitGuide/Major64-BitChanges/Major64-BitChanges.html>

If I’m mistaken though, please somebody let me know.

     From all the online research I’ve been doing trying to figure the problems 
out, it’s sorta leading me to the question "Has the SWORD framework been 
updated to be 64 bit compatible?” I’ve searched the Sword project wiki and 
searched what I can of the mailing list, but I can’t find any definitive answer.

     Also, in case it’s not known, Windows in comparison to Mac/Unix/Linux uses 
a different 64 bit convention. Mac (including iPhone) uses LP64. So, long or 
long int, for example, is a 64-bit quantity, but for Windows it remains a 
32-bit quantity even when run in the 64-bit runtime. So, is it possible that 
the SWORD framework does not have the same warnings that I get when compiled on 
a computer running the Windows OS? 

     I get the impression that these warnings can be ignored and the program 
work as long as the values that the long, unsigned long, or etc. hold never 
exceed a 32-bit size? and errors only occur if they are exceeded?

     I’m concerned about these 64-bit warnings because it’s my understanding 
that Apple requires apps to be 64-bit compatible and they vet each app for 
entry into the store. So, I don’t know how these warnings would be treated by 
them. I can see why Xcode or the compiler is treating them as warnings since 
they are apparantly correct in the 32-bit runtime. However, it seems that there 
is a “proper” way to convert the data types from one to another which works in 
both 32 and 64-bit runtimes? and since the code does not do that, Xcode assumes 
that it is either pre-64-bit code or that it is an erroneous typed line of code 
and hence gives a warning?

     Sorry, if I’m way off on any of this. If you’ve read all this, thank you, 
I know it’s a lot.

-TS


> On Oct 14, 2016, at 4:58 AM, Peter Von Kaehne <ref...@gmx.net> wrote:
> 
> https://developer.apple.com/library/content/documentation/Darwin/Conceptual/64bitPorting/building/building.html
>  
> suggests that some flags are less useful than others in terms of warnings 
> produced - some flags produce a plethora of spurious and irrelevant warnings
>  
> Is that maybe part of your problem?
>  
> Peter
>  
> Gesendet: Freitag, 14. Oktober 2016 um 12:15 Uhr
> Von: "Manfred Bergmann" <manfred.bergm...@me.com>
> An: "SWORD Developers' Collaboration Forum" <sword-devel@crosswire.org>
> Betreff: Re: [sword-devel] How do you make the Sword framework work in 64bit 
> mode? (My compiler is giving me hundreds of warnings.)
> 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.
>  
>  
>  
> Manfred
>  
>  
> Am 13.10.2016 um 22:30 schrieb TS <outofthec...@icloud.com 
> <mailto:outofthec...@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@crosswire.org 
> <mailto:sword-devel@crosswire.org>
> http://www.crosswire.org/mailman/listinfo/sword-devel 
> <http://www.crosswire.org/mailman/listinfo/sword-devel>
> Instructions to unsubscribe/change your settings at above page
> 
> _______________________________________________ sword-devel mailing list: 
> sword-devel@crosswire.org 
> http://www.crosswire.org/mailman/listinfo/sword-devel 
> <http://www.crosswire.org/mailman/listinfo/sword-devel> Instructions to 
> unsubscribe/change your settings at above page
> _______________________________________________
> sword-devel mailing list: sword-devel@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@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to