c++ libs in bsp_spec file?

Ralf Corsepius ralf.corsepius at rtems.org
Thu Jan 6 17:01:55 UTC 2005


On Thu, 2005-01-06 at 11:17 -0500, Smith, Gene wrote:
> I am 99% sure that I configured my ppc405 based bsp with the flag 
> --enable-cxx. However, when I linked my app containing several c++ 
> modules I got undefined references to "operator delete[]" and other 
> c++ish things. I noticed that my installed bap_specs file contained no 
> "++" libraries listed. So I manually added -lstdc++ and -lrtems++ to the 
> *lib: area of bsp_specs and it fixed the link errors. Should these ++ 
> libraries appear automatically in bsp_specs
Definitely no.

>  when the project is 
> configured with c++ or do these typically have to be manually included 
> in bsp_specs file?
Neither. You have to use "g++" instead of "gcc" to link. Explicitly
specifying -lstdc++ on the link command line or inside of a spec file
(which is more or less equivalent to using the command-line) is fault.

If this doesn't work, something else is broken.

Ralf





More information about the users mailing list