This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
GCC3.2/eCos-- undefined reference to std::operator new(unsigned)
- From: "Jurica Baricevic" <jura at INTESIS dot hr>
- To: "Ecos" <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 11 Sep 2002 12:01:02 +0200
- Subject: [ECOS] GCC3.2/eCos-- undefined reference to std::operator new(unsigned)
Hello.
I am using GCC3.2/newlib1.10.0/binutils2.13 to compile eCos for a MIPS R3000
target.
GCC is configured as
follow: --target=mipsel-r3041-elf --with-gnu-as --with-gnu-ld --with-newlib
Compiling code that uses this:
(...cut...)
template <class T>
inline typename allocator<T>::pointer
allocator<T>::
allocate( size_t n, const_pointer hint )
{
set_new_handler(0);
pointer temp = static_cast<pointer>( ::operator new( n *
sizeof(value_type) ) );
if( temp == 0 )
{
//FIXME....
printf("system out of memory..... :-S\n");
exit(1);
}
return temp;
}
(...cut...)
I get this error form the linker (I obviously included <new>. )
(...cut...)
undefined reference to `std::set_new_handler(void (*)())'
undefined reference to `std::operator new(unsigned)'
(...cut...)
The same code links fine with GCC2.95.2.
Any idea on how I could fix this?
Thanks,
Jura
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss