|
Boost Users : |
Subject: Re: [Boost-users] boost iOS8 failure
From: Steven Clark (steven.clark_at_[hidden])
Date: 2015-02-10 19:26:56
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_at_[hidden]) 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_at_[hidden]] On Behalf Of David Medine
Sent: Tuesday, February 10, 2015 2:30 PM
To: boost-users_at_[hidden]
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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net