This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: Strange __cxa_pure_virtual problem
- From: John Dallaway <john at dallaway dot org dot uk>
- To: Uwe Kindler <uwe_kindler at web dot de>
- Cc: ecos-devel at sourceware dot org
- Date: Fri, 07 Aug 2009 10:35:39 +0100
- Subject: Re: Strange __cxa_pure_virtual problem
- References: <4A79D58B.8070300@web.de>
Hi Uwe
Uwe Kindler wrote:
> I'm currently in the process of testing uSTL library port. I tried to
> build the library without filestream support and without package file I/O.
>
> The library build process succeeds. Bu if I start building the test
> cases then the compiler fails on building diag_sprintf1 test with the
> error message:
>
> make[1]: Leaving directory
> `/home/Nutzer/ustl_test_08_nofio_build/infra/current'
> /opt/ecos/gnutools/arm-eabi/bin/../lib/gcc/arm-eabi/4.3.2/../../../../arm-eabi/lib/nointerwork/libsupc++.a(pure.o):
> In function `__cxa_pure_virtual':
> make: Leaving directory `/home/Nutzer/ustl_test_08_nofio_build'
> (.text.__cxa_pure_virtual+0x14): undefined reference to `write'
> collect2: ld returned 1 exit status
>
> So the compiler/linker does not link the __cxa_pure_virtual function in
> infra/current/src/pure.cxx and instead takes the implementation from
> libsupc++.
Perhaps this problem is related to the libsupc++ implementation of
__cxa_pure_virtual() moving into the __cxxabiv1 namespace:
http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/libsupc%2B%2B/pure.cc?r1=85452&r2=85463&diff_format=h
Try providing your own implementation of:
__cxxabiv1::__cxa_pure_virtual()
John Dallaway