
We're building a multithreaded OS X application with xcode, that uses cocoa, objective c++, and makes a lot of use of shared_ptr and other parts of Boost. We're currently using boost 1_32_0 (I've just upgraded from boost-1.30.2). We're getting some crashes, and I've started to suspect that <boost/shared_ptr.hpp> isn't being compiled with multithread awareness. Acting on this hunch, if <boost/requires_threads.hpp> is included, it generates the compilation error: "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" ...which seems to suggest that shared_ptrs (if they use the same config info) wouldn't be compiling in thread support. Are application also makes use of the pthread API, and cocoa's threads class, and these both seem to be working as expected. We've had a look at xcode's options, but have found no way to explicitly turn on thread support. Specifically, adding -pthread or -pthreads causes the compiler to issue an error. We have also looked for a configure script in the boost distribution, but can find nothing (except for the one in libs/config/ which doesn't seem to work, but I personally think we're using it wrong). If someone could suggest what we may be missing, I'd be terribly grateful. Thanks very much, and thanks for a great library! Cheers, Benjohn
participants (1)
-
Benjohn