This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Creating C library implemented in C++
- From: lrtaylor at micron dot com
- To: <sdowning at fame dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 21 Oct 2003 12:16:42 -0600
- Subject: RE: Creating C library implemented in C++
If you place '-static' as the last argument on the link command line,
that should cause the "standard" libraries (libstdc++, etc.) to get
linked in statically. Or you could specify "-nostdlib", which would
keep g++ from adding the libraries automatically. You could then
explicitly link to the libraries the way you want. I'm not sure if that
causes any other changes to be made to the linker command line that GCC
uses internally, though...
Cheers,
Lyle
-----Original Message-----
From: Stuart F. Downing [mailto:sdowning@fame.com]
The reason I used the gcc driver instead of g++ was that I wanted the
gcc libraries statically linked, and g++ overrode my attempts to link
statically. It was a while back that I switched to the gcc driver, so
my recollection of the issues is getting a bit vague. I'll retry with
g++ and see if I can get it to work the way I want.
Thanks,
Stuart