If you're not using C++ features maybe it's okay.
I guess the risk is that multiple copies of the
runtime might not play well with each other. Here's
two articles that talk about it:
http://www.trilithium.com/johan/2005/06/static-libstdc/
http://pages.cs.wisc.edu/~psilord/blog/2.html
Valve links to libstdc++.a and libgcc_eh.a statically
in HL2. We've run into subtle linking problems with
this in the past. They're rare, but impossible to
debug as they're usually crashes deep in the runtime.
I also worry (perhaps incorrectly) about ELF's
attitude toward symbol resolution. Is it possible for
library A to statically link to the runtime, and for
library B to bind to A's implementation because the
symbols were accidentally exported?
Regards,
--
David Anderson
http://www.bailopan.net/
--- Florian Zschocke <zschocke@...> wrote:
> On Mon, Jan 5, 2009 at 1:43 AM, David Anderson
> <player220101@...> wrote:
>
> > You shouldn't link to libstdc++*.a directly.
>
> Okay, but could you explain the reason?
>
> Thanks,
> Florian
>