This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]