|
Boost : |
From: Benjohn (benjohn_at_[hidden])
Date: 2005-02-02 13:06:30
Compiling with xcode on OS X, and targeting a cocoa, objective c++
application, we've had some configuration trouble with boost
(shared_ptr in particular) not compiling with multithreaded support.
This seems to come down to a problem in the "file
boost/config/platform/macos.hpp" which has the lines:
# ifndef TARGET_CARBON
# include <boost/config/posix_features.hpp>
# endif
Because TARGET_CARBON is defined as part of Apple's framework (which I
think is normal for a cocoa application), "posix_features.hpp" doesn't
get a chance to make sure BOOST_HAS_THREADS gets defined.
Posting [1] to this list indicates that the "ifndef TARGET_CARBON" was
added as a work around for codewarrior's environment, and [2] mentions
that there's a problem with it as a solution.
I've patched this based on a suggestion by Glen Simmons (thanks) by:
* creating a modified copy of "macos.hpp" that always includes
"posix_features.hpp",
* define BOOST_PLATFORM_CONFIG (in our prefix file) to point at the
patch.
Of course, it would be splendid if boost figured all this out itself.
I'd be more than happy to test out an official fix.
Cheers,
Benjohn Barnes
[1] http://lists.boost.org/MailArchives/boost-users/msg02664.php
[2] http://lists.boost.org/MailArchives/boost-users/msg07979.php
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk