This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: 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


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