Boost logo

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
        * define BOOST_PLATFORM_CONFIG (in our prefix file) to point at the

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.

        Benjohn Barnes


Boost list run by bdawes at, gregod at, cpdaniel at, john at