[Bug libstdc++/54314] [4.8 Regression] undefined references to 'construction vtable for std::ostream-in-std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'

pluto at agmk dot net gcc-bugzilla@gcc.gnu.org
Tue Sep 10 09:46:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54314

Pawel Sikora <pluto at agmk dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pluto at agmk dot net

--- Comment #39 from Pawel Sikora <pluto at agmk dot net> ---
Hi,

i see mentioned linker error on the current gcc-4.8.2 for i686-gnu-linux target
and somehow it works for x86_64-gnu-linux target.


../../../lib/libUnitTest++.a(Test.cpp.o):Test.cpp:function construction vtable
for std::__7::basic_ostream<char, std::__7::char_traits<char>
>-in-UnitTest::MemoryOutStream: error: undefined reference to 'virtual thunk to
std::__7::basic_ostream<char, std::__7::char_traits<char> >::~basic_ostream()'
../../../lib/libUnitTest++.a(Test.cpp.o):Test.cpp:function construction vtable
for std::__7::basic_ostream<char, std::__7::char_traits<char>
>-in-UnitTest::MemoryOutStream: error: undefined reference to 'virtual thunk to
std::__7::basic_ostream<char, std::__7::char_traits<char> >::~basic_ostream()'
../../../lib/libUnitTest++.a(Test.cpp.o):Test.cpp:function construction vtable
for std::__7::basic_ostringstream<char, std::__7::char_traits<char>,
std::__7::allocator<char> >-in-UnitTest::MemoryOutStream: error: undefined
reference to 'virtual thunk to std::__7::basic_ostringstream<char,
std::__7::char_traits<char>, std::__7::allocator<char>
>::~basic_ostringstream()'
../../../lib/libUnitTest++.a(Test.cpp.o):Test.cpp:function construction vtable
for std::__7::basic_ostringstream<char, std::__7::char_traits<char>,
std::__7::allocator<char> >-in-UnitTest::MemoryOutStream: error: undefined
reference to 'virtual thunk to std::__7::basic_ostringstream<char,
std::__7::char_traits<char>, std::__7::allocator<char>
>::~basic_ostringstream()'


MemoryOutStream is declared in the UnitTest++ as:

#include <sstream>

namespace UnitTest
{

class MemoryOutStream : public std::ostringstream
{
public:
    MemoryOutStream() {}
    char const* GetText() const;

private:
    MemoryOutStream(MemoryOutStream const&);
    void operator =(MemoryOutStream const&);

    mutable std::string m_text;
};

}



More information about the Gcc-bugs mailing list