Compilation error trying to pull in Boost::threads header file
Error compiling a program trying to use Boost::thread. Nothing special on the offending line, simply an include of thread.hpp Fedora 17 gcc 4.7 Boost: 1_47_0 /usr/local/lib/Boost/boost_1_ 47_0/boost/thread/pthread/thread_data.hpp:36:41: error: use of deleted function ‘boost::shared_ptrboost::detail::tss_cleanup_function::shared_ptr(const boost::shared_ptrboost::detail::tss_cleanup_function&)’ 1) Seems like boost is trying to pull in boost:shared_ptr. Shouldnt this be pulling this from the std namespace now ? 2) Why are the boost libraries in a stage dir ? i.e. boost_1_47_0/*stage/* lib/libboost_program_options.so.1.47.0 Is this standard now ? tia, Sunil
On Mon, Sep 10, 2012 at 02:04:29PM -0400, Sunil Matta wrote:
Fedora 17 gcc 4.7 Boost: 1_47_0
Your Boost is from mid-2011. Your GCC is from mid-2012. Pretty much all bets are off when using an older Boost than your toolchain.
1) Seems like boost is trying to pull in boost:shared_ptr. Shouldnt this be pulling this from the std namespace now ?
std::shared_ptr is not boost::shared_ptr. boost::shared_ptr is not std::shared_ptr. They differ in capabilities and implementation. Also, most of the world isn't C++11 for a long while.
2) Why are the boost libraries in a stage dir ? i.e. boost_1_47_0/*stage/* lib/libboost_program_options.so.1.47.0 Is this standard now ?
Boost.Build has always performed a 'stage' build if you do not explicitly say 'install'. You may customize the stagedir and install directories with the --stagedir and --prefix/--libdir/--includedir options to b2 (bjam). -- Lars Viklund | zao@acc.umu.se
Le 10/09/12 20:04, Sunil Matta a écrit :
Error compiling a program trying to use Boost::thread. Nothing special on the offending line, simply an include of thread.hpp
Fedora 17 gcc 4.7 Boost: 1_47_0
/usr/local/lib/Boost/boost_1_ 47_0/boost/thread/pthread/thread_data.hpp:36:41: error: use of deleted function ‘boost::shared_ptrboost::detail::tss_cleanup_function::shared_ptr(const boost::shared_ptrboost::detail::tss_cleanup_function&)’
Hi,
I'm seeing this code in shared_ptr.hpp
template<class Y>
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
shared_ptr( shared_ptr<Y> const & r, typename
boost::detail::sp_enable_if_convertible
1) Seems like boost is trying to pull in boost:shared_ptr. Shouldnt this be pulling this from the std namespace now ? If you follow your reasoning, you should been using std::thread ;-)
Best, Vicente
As Lars recommended, just pulled down boost 1.51 and I have gotten the file to compile. Seems to be fine now. More tests to follow. Thanks, Sunil On Mon, Sep 10, 2012 at 6:14 PM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
Le 10/09/12 20:04, Sunil Matta a écrit :
Error compiling a program trying to use Boost::thread. Nothing special on
the offending line, simply an include of thread.hpp
Fedora 17 gcc 4.7 Boost: 1_47_0
/usr/local/lib/Boost/boost_1_ 47_0/boost/thread/pthread/**thread_data.hpp:36:41: error: use of deleted function ‘boost::shared_ptrboost::**detail::tss_cleanup_function:**:shared_ptr(const boost::shared_ptrboost::**detail::tss_cleanup_function&**)’
Hi,
I'm seeing this code in shared_ptr.hpp
template<class Y> #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_ **convertible
::type = boost::detail::sp_empty() ) #else
shared_ptr( shared_ptr<Y> const & r )
#endif : px( r.px ), pn( r.pn ) // never throws { }
I don't know ho wBoost is installed on your platform, but it seems that there is an issue there.
1) Seems like boost is trying to pull in boost:shared_ptr. Shouldnt this
be pulling this from the std namespace now ?
If you follow your reasoning, you should been using std::thread ;-)
Best, Vicente
______________________________**_________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/**mailman/listinfo.cgi/boost-**usershttp://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Lars Viklund
-
Sunil Matta
-
Vicente J. Botet Escriba