c++, new() error

Joel Sherrill joel.sherrill at OARcorp.com
Tue Aug 26 19:35:07 UTC 2003


Francesco Poletti wrote:

> Hy all,
> 
> I'm trying to see if is possible to use c++ on my board (which I have personally
> wrtitten for an arm starting by an existing one.)
> 
> 
> Now I'm able to compile an application which define static object, the only
> problem is that I can't use new(),  because when I try compile the compiler give
> to me that error:
>  
> /scratch/francesco/initialc++/init.cpp:44: undefined reference to `operator
> new(unsigned long)'
> /scratch/francesco/initialc++/init.cpp:44: undefined reference to `operator
> delete(void*)'
> /scratch/francesco/initialc++/init.cpp:44: undefined reference to `operator
> delete(void*)'
> /scratch/francesco/initialc++/init.cpp:51: undefined reference to
> `__gxx_personality_sj0'
> 
> Someone know if is possible to have a board which use it? If yes what I need to
> had in order to have it working?

Yes.  And this is probably he result of missing some sections that are
C++ specific in yout linkcmds.  Check your BSP's linkcmds against
another one.  I think you are on an ARM so check the edp7312.  I am
pretty sure Jay Monkman tested C++.

> Really thanks to all  Francesco.
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the users mailing list