Hi,

that probably will solve the problem. But why is it even necessary? Unless
the stdlib is compiled with some other flags than the library or some weird
flags where passed in, the g++ should always add the c++ stdlib to the
linker. Did you invoke ld or g++ for the linking stage?

Sean

2011/11/9 Дмитрий Оксенчук <oksenchu...@gmail.com>

> Try to add -lstdc++ to linker flags.
>
> 2011/11/9 chinmoy saha <schin...@earthlink.net>:
> > Hi,
> >
> >
> >
> > Please help, I am getting the following error during make, I am using
> Linux
> >  2.4.20-6 #1 Thu Feb 27 10:06:59 EST 2003i686 i686 i386 GNU/Linux
> >
> >
> >
> > make
> >
> > Linking TestUnitTest++...
> >
> > libUnitTest++.a(AssertException.o)(.text+0xd): In function
> >
> > `UnitTest::AssertException::AssertException[not-in-charge](char
> >
> > const*, char const*, int)':
> >
> > src/AssertException.cpp:8: undefined reference to
> > `std::exception::exception[not-in-charge]()'
> >
> > libUnitTest++.a(AssertException.o)(.text+0x65): In function
> >
> > `UnitTest::AssertException::AssertException[in-charge](char const*, char
> > const*, int)':
> >
> > src/AssertException.cpp:8: undefined reference to
> > `std::exception::exception[not-in-charge]()'
> >
> >
> libUnitTest++.a(DeferredTestReporter.o)(.gnu.linkonce.t._ZSt10_ConstructIN8UnitTest18DeferredTestResultES1_EvPT_RKT0_+0xf):
> >
> > In function `void std::_Construct<UnitTest::DeferredTestResult,
> >
> > UnitTest::DeferredTestResult>(UnitTest::DeferredTestResult*,
> >
> > UnitTest::DeferredTestResult const&)':
> >
> > /usr/include/c++/3.2.2/bits/stl_uninitialized.h:86: undefined reference
> to
> > `operator new(unsigned, void*)'
> >
> >
> libUnitTest++.a(DeferredTestReporter.o)(.gnu.linkonce.t._ZSt10_ConstructISt4pairIiSsES1_EvPT_RKT0_+0xf):
> >
> > In function `void std::_Construct<std::pair<int, std::basic_string<char,
> > std::char_traits<char>, std::allocator<char> >
> >
> >>, std::pair<int, std::basic_string<char, std::char_traits<char>,
> >
> > std::allocator<char> > > >(std::pair<int, std::basic_string<char,
> > std::char_traits<char>, std::allocator<char> > >*, std::pair<int,
> > std::basic_string<char, std::char_traits<char>, std::allocator<char> >
> >
> >> const&)':
> >
> > /usr/include/c++/3.2.2/bits/stl_uninitialized.h:86: undefined reference
> to
> > `operator new(unsigned, void*)'
> >
> > collect2: ld returned 1 exit status
> >
> > make: *** [TestUnitTest++] Error 1
> >
> >
> >
> > Thanks,
> >
> > Chinmoy
> >
> >
> ------------------------------------------------------------------------------
> > RSA(R) Conference 2012
> > Save $700 by Nov 18
> > Register now
> > http://p.sf.net/sfu/rsa-sfdev2dev1
> > _______________________________________________
> > unittest-cpp-devel mailing list
> > unittest-cpp-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel
> >
> >
>
>
>
> --
> С уважением,
> Оксенчук Дмитрий
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> unittest-cpp-devel mailing list
> unittest-cpp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
unittest-cpp-devel mailing list
unittest-cpp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel

Reply via email to