This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]