[exception][iostream] link error in boost_1_52_0

I'm getting the following link error using boost_1_52_0 with Xcode 3.2.6 gcc 4.2: "std::bad_alloc::what() const", referenced from: vtable for boost::exception_detail::error_info_injector<std::bad_alloc>in libboost_iostreams-mt.a(zlib.o) vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_alloc>
in libboost_iostreams-mt.a(zlib.o)
Boost exception is listed as a header only library, but there is clone_current_exception_non_intrusive.cpp in ..\boost_1_52_0\libs\exception\src. Does boost.exception lib need to be built? thanks, jeff

On Fri, Dec 21, 2012 at 6:58 AM, Jeff Flinn <Jeffrey.Flinn@gmail.com> wrote:
I'm getting the following link error using boost_1_52_0 with Xcode 3.2.6 gcc 4.2:
"std::bad_alloc::what() const", referenced from:
vtable for boost::exception_detail::error_info_injector<std::bad_alloc>in libboost_iostreams-mt.a(zlib.o)
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_alloc>
in libboost_iostreams-mt.a(zlib.o)
Boost exception is listed as a header only library, but there is clone_current_exception_non_intrusive.cpp in ..\boost_1_52_0\libs\exception\src. Does boost.exception lib need to be built?
No. The .cpp file you're referring to is not used by default. The link error you're getting seems to be for std::bad_alloc::what(); the linker can't find a function from the compiler's standard library. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode

On 12/21/2012 3:14 PM, Emil Dotchevski wrote:
On Fri, Dec 21, 2012 at 6:58 AM, Jeff Flinn <Jeffrey.Flinn@gmail.com> wrote:
I'm getting the following link error using boost_1_52_0 with Xcode 3.2.6 gcc 4.2:
"std::bad_alloc::what() const", referenced from:
vtable for boost::exception_detail::error_info_injector<std::bad_alloc>in libboost_iostreams-mt.a(zlib.o)
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::bad_alloc>
in libboost_iostreams-mt.a(zlib.o)
Boost exception is listed as a header only library, but there is clone_current_exception_non_intrusive.cpp in ..\boost_1_52_0\libs\exception\src. Does boost.exception lib need to be built?
No. The .cpp file you're referring to is not used by default.
The link error you're getting seems to be for std::bad_alloc::what(); the linker can't find a function from the compiler's standard library.
Thanks Emil, I was staring at that and my mind was seeing boost not std. :-( Jeff
participants (2)
-
Emil Dotchevski
-
Jeff Flinn