c++ libraries

Matthew Jones matthewjones@vw1600e.org.uk
Thu Apr 21 07:46:00 GMT 2005

Quoting Craig Edwards <craig@haenterprises.com.au>:

> I recently ported the newlib libraries to work on the XBOX and would like
> to add C++ support.  Now, I've looked around, and to be honest, am very
> confused about what I need to port so that it will work with my newlib
> port.  Do I somehow need to extract the libstdc++ stuff from gcc?  I
> thought STL might have been a good place to start, but the SGI STL stuff
> seems to just be a collection of header files.
> Sorry for the newbish-ness of the question... I am just confused!  Any
> advice would be much appreciated.  Thanks a lot.

For just the language support, you are on the right track - get libstdc++ built,
then link with libsupc++, the C++ language support library. I am doing exactly
this, with newlib, for a PowerPC target.

Take care with crt0 and the linker script - there are C++ aspects to both. The
default linker script that gcc produces is a good starting point.

For full STL you need all the headers, and libstdc++.

Matthew JONES

More information about the Newlib mailing list