Steven,
Thanks for this. I am familiar with the script you mention, although I haven't tried that yet. I have been using a pre-compiled for iOS library that I found (which I seem to recall uses the script of which you speak). I have also tried to build my own boost as part of the project.

The shell script may provide a clue, though. Obviously someone has been able to compile boost code for iOS8. If the script can build it, then so can I, right?

Thanks again for the feedback -- this has been driving me nuts.
-David

On 2/10/2015 4:26 PM, Steven Clark wrote:

I have been building and using a subset of Boost for an app that runs on iOS 8.x for months.  I build Boost 1.52 with a shell script based on “boost.sh” written by Pete Goodliffe in 2009 that you can find with Google.  I’m building the thread, signals, filesystem, regex, system, and date_time libraries.  It’s an older solution, but it still works fine for me.

 

If you want more details, please email me directly (sclark@vgocom.com) so as not to clutter up the list.  However, if you’re not adept at bash scripting, then you might be better served by pursuing another solution.

 

Steven J. Clark

VGo Communications

 

From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of David Medine
Sent: Tuesday, February 10, 2015 2:30 PM
To: boost-users@lists.boost.org
Subject: [Boost-users] boost iOS8 failure

 

First of all, I know that calls for help are not appropriate to the list, so let me disclaim by saying that I am not asking for help, simply reporting an issue.

I am attempting to compile a C++ library (that uses boost) for iOS8 distribution. The library compiles fine on OSX (and Linux and Windows) but will not compile for iOS8.  I get dozens of compiler complaints regarding boost headers that all involve some sort of 'Semantic Issue'.

For example, in boost's hash.hpp, I get a 'No matching function for call to 'has_value' error on these lines (439-442):

    BOOST_HASH_SPECIALIZE_REF(std::string)
#if !defined(BOOST_NO_STD_WSTRING)
    BOOST_HASH_SPECIALIZE_REF(std::wstring)
#endif
 

In this case I was able to skirt the issue by adding code to define the function hash_value for std::string and std::wstring:

    inline std::size_t hash_value(
        std::string const &v)
    {
        return hash_range(v.begin(), v.end());
    }
   
    inline std::size_t hash_value(
        std::wstring const &v)
    {
        return hash_range(v.begin(), v.end());
    }


I am probably going to go through all such failures of clang to interpret the boost code correctly for iOS compilation and modify the source just so I can get this going. This is a major pain because there are dozens of these, many of which are far less straightforward to remedy. Besides I don't necessarily want a custom version of boost that ships with my library.

I have the build settings in my iOS project (I'm using XCode) exactly the same as they are in the OSX project. I don't understand why the compiler behaves differently for these two targets.

Finally, there are two stackoverflow questions that I posted related to this problem.
http://stackoverflow.com/questions/28422862/clang-different-when-compiling-for-osx-and-ios
http://stackoverflow.com/questions/28308466/ios8-boost-hash-hpp-system-clock-hpp-etc-fail

THX!



_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users