Menu

Patch for Build Error (scoped_ptr)

Help
Joel Young
2012-03-06
2013-04-30
  • Joel Young

    Joel Young - 2012-03-06

    With boost 1.47, a different include is needed for scoped_ptr.  You are including share_ptr, but need to include scoped_ptr.  In addition, you will need to link in pthreads.  Patch is attached.

    -- src/CMakeLists.txt 2012-03-06 10:01:44.319189611 -0800
    +++ src/CMakeLists.txt.orig 2012-03-06 10:00:53.014185035 -0800
    @@ -166,6 +166,5 @@
    ${Boost_FILESYSTEM_LIBRARY}
    ${Boost_SYSTEM_LIBRARY}
    ${ZLIB_LIBRARIES}
    -                pthread
    )

    -- src/app.hpp 2012-03-06 09:35:32.143049381 -0800
    +++ src/app.hpp.orig 2011-12-10 12:08:56.000000000 -0800
    @@ -23,7 +23,6 @@
    #include <memory>

    #include <boost/shared_ptr.hpp>
    -#include <boost/scoped_ptr.hpp>
    #include <boost/noncopyable.hpp>

    #include "io.hpp"

     
  • Joel Young

    Joel Young - 2012-03-06

    of course, my patch was inverted

    -- src/CMakeLists.txt.orig 2012-03-06 10:00:53.014185035 -0800
    +++ src/CMakeLists.txt 2012-03-06 10:01:44.319189611 -0800
    @@ -166,5 +166,6 @@
    ${Boost_FILESYSTEM_LIBRARY}
    ${Boost_SYSTEM_LIBRARY}
    ${ZLIB_LIBRARIES}
    +                pthread
    )

    -- src/app.hpp.orig 2011-12-10 12:08:56.000000000 -0800
    +++ src/app.hpp 2012-03-06 09:35:32.143049381 -0800
    @@ -23,6 +23,7 @@
    #include <memory>

    #include <boost/shared_ptr.hpp>
    +#include <boost/scoped_ptr.hpp>
    #include <boost/noncopyable.hpp>

    #include "io.hpp"

     
  • Sav

    Sav - 2012-03-07

    thanks =)

     

Log in to post a comment.