Hi, I am tying use boost's shared_ptr.hpp, but it gives me the following compile errors: /usr/include/boost/detail/sp_counted_impl.hpp: In member function 'virtual void* boost::detail::sp_counted_impl_pd
::get_deleter(const std::type_info&)': /usr/include/boost/detail/sp_counted_impl.hpp:150: error: cannot use typeid with -fno-rtti /usr/include/boost/detail/sp_counted_impl.hpp: In member function 'virtual void* boost::detail::sp_counted_impl_pda
::get_deleter(const std::type_info&)': /usr/include/boost/detail/sp_counted_impl.hpp:220: error: cannot use typeid with -fno-rtti I have these in my .h file: using namespace boost; class Rect; typedef shared_ptr<Rect> RectPtr; My question is why I need to enable 'rtti' in order to use boost shared_ptr ? And if there is any other smart pointer library which does not require me to enable rtti ? Thank you.
On Fri, Jul 11, 2008 at 6:06 PM, Igor R
Does it compile if you define BOOST_NO_TYPEID ?
My question is why I need to enable 'rtti' in order to use boost shared_ptr ?
IIRC, get_deleter() function uses typeid(), which is unavailable in your case.
I have added '#define BOOST_NO_TYPEID ' Before I include 'shared_ptr.hpp', but i still get the following error: /usr/include/boost/detail/sp_counted_impl.hpp: In member function 'virtual void* boost::detail::sp_counted_impl_pd
::get_deleter(const std::type_info&)':
/usr/include/boost/detail/sp_counted_impl.hpp:150: error: cannot use
typeid with -fno-rtti
#define BOOST_NO_TYPEID
#include
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Sat, Jul 12, 2008 at 1:19 AM, Meryl Silverburgh
On Fri, Jul 11, 2008 at 6:06 PM, Igor R
wrote: Does it compile if you define BOOST_NO_TYPEID ?
My question is why I need to enable 'rtti' in order to use boost shared_ptr ?
IIRC, get_deleter() function uses typeid(), which is unavailable in your case.
I have added '#define BOOST_NO_TYPEID ' Before I include 'shared_ptr.hpp', but i still get the following error:
/usr/include/boost/detail/sp_counted_impl.hpp: In member function 'virtual void* boost::detail::sp_counted_impl_pd
::get_deleter(const std::type_info&)': /usr/include/boost/detail/sp_counted_impl.hpp:150: error: cannot use typeid with -fno-rtti
#define BOOST_NO_TYPEID #include
using namespace std; using namespace boost;
Can you please tell me if there is a way to use boost smart pointer without rtti? Thank you.
Thank you. I upgrade to 1.35 boost. And I get pass that problem.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Sat, Jul 12, 2008 at 2:16 AM, Meryl Silverburgh
On Sat, Jul 12, 2008 at 1:19 AM, Meryl Silverburgh
wrote: On Fri, Jul 11, 2008 at 6:06 PM, Igor R
wrote: Does it compile if you define BOOST_NO_TYPEID ?
My question is why I need to enable 'rtti' in order to use boost shared_ptr ?
IIRC, get_deleter() function uses typeid(), which is unavailable in your case.
I have added '#define BOOST_NO_TYPEID ' Before I include 'shared_ptr.hpp', but i still get the following error:
/usr/include/boost/detail/sp_counted_impl.hpp: In member function 'virtual void* boost::detail::sp_counted_impl_pd
::get_deleter(const std::type_info&)': /usr/include/boost/detail/sp_counted_impl.hpp:150: error: cannot use typeid with -fno-rtti
#define BOOST_NO_TYPEID #include
using namespace std; using namespace boost;
Can you please tell me if there is a way to use boost smart pointer without rtti? Thank you.
Thank you. I upgrade to 1.35 boost. And I get pass that problem.
Hi I have this link error. it looks like it can't find boost exception? Can you please tell me if there is any #define that I can turn off exception in boost? ../..//src/blocks/libblocks_s.a(Utils.o): In function `shared_count<Rect>': /usr/local/include/boost-1_35/boost/detail/shared_count.hpp:96: undefined reference to `boost::throw_exception(std::exception const&)' /usr/bin/ld: libgkout.so: hidden symbol `boost::throw_exception(std::exception const&)' isn't defined /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status Thank you.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Sun, Jul 13, 2008 at 2:14 PM, Meryl Silverburgh
On Sat, Jul 12, 2008 at 2:16 AM, Meryl Silverburgh
wrote: On Sat, Jul 12, 2008 at 1:19 AM, Meryl Silverburgh
wrote: On Fri, Jul 11, 2008 at 6:06 PM, Igor R
wrote: Does it compile if you define BOOST_NO_TYPEID ?
My question is why I need to enable 'rtti' in order to use boost shared_ptr ?
IIRC, get_deleter() function uses typeid(), which is unavailable in your case.
I have added '#define BOOST_NO_TYPEID ' Before I include 'shared_ptr.hpp', but i still get the following error:
/usr/include/boost/detail/sp_counted_impl.hpp: In member function 'virtual void* boost::detail::sp_counted_impl_pd
::get_deleter(const std::type_info&)': /usr/include/boost/detail/sp_counted_impl.hpp:150: error: cannot use typeid with -fno-rtti
#define BOOST_NO_TYPEID #include
using namespace std; using namespace boost;
Can you please tell me if there is a way to use boost smart pointer without rtti? Thank you.
Thank you. I upgrade to 1.35 boost. And I get pass that problem.
Hi
I have this link error. it looks like it can't find boost exception? Can you please tell me if there is any #define that I can turn off exception in boost?
../..//src/blocks/libblocks_s.a(Utils.o): In function `shared_count<Rect>': /usr/local/include/boost-1_35/boost/detail/shared_count.hpp:96: undefined reference to `boost::throw_exception(std::exception const&)' /usr/bin/ld: libgkout.so: hidden symbol `boost::throw_exception(std::exception const&)' isn't defined /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status
Thank you.
I think I need to implement this method myself. void boost::throw_exception(std::exception const & e) { } Thank you.
AMDG Meryl Silverburgh wrote:
I think I need to implement this method myself.
void boost::throw_exception(std::exception const & e) { }
You should only need to define throw_exception if BOOST_NO_EXCEPTIONS is defined. See http://www.boost.org/doc/libs/1_35_0/libs/utility/throw_exception.html In Christ, Steven Watanabe
participants (3)
-
Igor R
-
Meryl Silverburgh
-
Steven Watanabe