wrote:
> I want to link the C++ standard libraries statically for my
application
> because I don't space for the .so files on my target platform.
That's an interesting assessment: you don't have space for the shared
object but you expect to have space for the application with the
moral equivalent being linked in? I'd consider this to be relatively
unlikely: this only works if you don't use major parts of the standard
library (neither explicitly nor implicitly by other stuff you use).
> After quite a bit of searching, I found very little information that
> was helpful. The best information I found was at this link
> http://fresco.org/~njs/c++-without-stdc++
>
> I followed the approach here and used -nostdlib to disable the
default
> linking. Instead I use the options:
>
> -lsupc++ -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
Of course, this whole gcc stuff is environment specific and off-topic
in comp.lang.c++ and probably also in most of the other forums...
However: why don't you use the option "-static"? This links the
standard
library statically as long as you have a static version thereof. Use of
-nostdlib is more intended to people using a different implementation
of
the standard C++ library and is typically a little bit more involved
than just that...
> warning: cannot find entry symbol _start; defaulting to 000877e0
I think this symbol and a few others you'll need are defined in crt1.o,
crti.o, and crtn.o. Why these symbols are not included when specifying
the option -nostdlib, I don't know.
--
<private.php?do=newpm&u=> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting