Chris Baus

Yet another Unix nightmare: statically linking libstdc++

A potential user wrote to tell me that my binaries weren't working on his FC 3 box because he didn't have the same version of libstdc++ that I was using. Opps, I didn't mean to dynamically link libstdc++. I wrote back and said I would fix the problem by statically linking the library.

Oh boy I didn't know what I was up against. It is nearly impossible to statically link libstdc++ with gcc without statically linking glibc which is a noted bad idea (Hint: -static-libgcc doesn't do crap as far as I can tell).

Fortunately I'm not the only one suffering the pain of this problem, and it is a bit of a relief to do some virtual commiserating on this. Peter Keller has a detailed explanation. Peter's blog has some great Unixy stuff like: The Road to Hell is Paved with Good Intentions, which basically explains why I statically link my executables. I just subscribed.

Insert rant about the current state of C++ development here.