1

Possible Duplicate:
How to statically link libstdc++

I want to make sure to use the same version of the standard library on my target platform. So is there a way to compile it with my program?

Community
  • 1
  • 1
tzippy
  • 6,458
  • 30
  • 82
  • 151
  • 6
    `-static-libstdc++`. – Jesse Good Oct 22 '12 at 06:50
  • @LokiAstari According to the libstdc++ tag, its g++. – Mark Garcia Oct 22 '12 at 06:50
  • @Mark: Clang can be used with libstdc++ just aswell. – Xeo Oct 22 '12 at 06:51
  • @Xeo Well, thanks for the info. But I think libstdc++ cannot remain at that status forever. – Mark Garcia Oct 22 '12 at 06:52
  • this question was asked before http://stackoverflow.com/questions/6917413/how-to-statically-link-libstdc – evpo Oct 22 '12 at 07:09
  • @Mark: It's not libstdc++ that is portable (they don't declare `class type_info;` inside of `` but use it and GCC works around it with a compiler hack), but Clang behaving ~99% like GCC (except for Clang, you need to do `namespace std{ class type_info; }` before including `` when using libstdc++...). – Xeo Oct 22 '12 at 08:04

0 Answers0