Shmem shared_ptr issue with gcc 3.3.x

Ion and boost list, I've been working with the shmem version of shared_ptrs and have come accross and interesting issue. When using the library on a 3.4.x gcc compiler I have on issues however when compiling with a gcc 3.3.x compiler the #error Unrecongnized threading platform gets thrown from /boost/shmem/smart_ptr/sp_counted_base.hpp. It also apears that this compilation is successful when using standard boost shared_ptrs instead of the ones included with boost. Any assitance with this issue would be greatly appreciated. Paul Ryan SAIC - Tactical Systems

Hi, gcc 3.3.x is not officially supported in Shmem and shared_ptr for shared memory is not even in the documentation (because it was a working version). Glad to know there is a brave Shmem user ;-)! sp_counted_base.hpp defines only: #include <boost/config.hpp> #if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) # include <boost/shmem/smart_ptr/detail/sp_counted_base_w32.hpp> #elif defined( BOOST_HAS_PTHREADS ) //Ordinary pthreads counted base is not enough //we need process shared attributte. # include <boost/shmem/smart_ptr/detail/sp_counted_base_pt.hpp> #else // Use #define BOOST_DISABLE_THREADS to avoid the error # error Unrecognized threading platform #endif This might say that BOOST_HAS_PTHREADS is not detected. Maybe by default pthreads is not activated with your installed gcc (are you sure you are compiling multithreaded code?). I the only advice I can think is to add -pthread flag to the command line if you don't have that flag. "gcc --version" output and platform description would also be helpful. Regards, Ion
participants (2)
-
Ion Gaztañaga
-
Ryan, Paul L.