C++ problems

John Tilp tilp at ISI.EDU
Wed Feb 28 19:54:03 UTC 2007


Leon Pollak wrote:
> Hello, all.
> 
> I already have the "hello world" application running on my BSP and now want 
> the cdtest to run.
> I after debugging the code I see the following problems:
> 
> 1. CTORS are not called at all (I mean global constructors).
> 
> 2. Exceptions throwing dives into some (many) newlib and rtems code and comes 
> to the _exit() function call which calls rtems_shutdown_executive(). This is 
> obviously not the goal of C++ exception trowing...:-))
> 
> I shall be very thankfull for any hint where is my problem.
> 

Leon,

Confirm that gcc is being invoked with -specs bsp_specs and the -qrtems 
option and that your bsp's startfile spec in "bsp_specs" file includes 
crtbegin.o

For more ideas see:
http://www.rtems.org/wiki/index.php/Using_C_Plus_Plus
http://www.rtems.com/ml/rtems-users/2005/february/msg00029.html

--John




More information about the users mailing list