This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ linked as libstdc++.a
>That won't work on certain target platforms (eg. Mac OS X, where
>-static doesn't work), and also forces libc.a to be linked in
>statically. A more portable alternative is (example using the POSIX
>shell, localize as appropriate):
>
> LIBCXX=`g++ -print-file-name=libstdc++.a`
> g++ -o hello hello.cc $LIBCXX
Huh. Thanks, I had no idea -static was broken on Mac OS X.
For the (other) BSD's and Linux things are easier.
-benjamin