Link different C++ standard libraries on Mac OS X

前端 未结 1 785
予麋鹿
予麋鹿 2021-01-04 13:57

Now that multiple C++ standard libraries can exist on Mac OS X, it now looks like quite a chaotic situation. According to https://stackoverflow.com/a/8457799/1772681, mixing

相关标签:
1条回答
  • 2021-01-04 13:59

    I don't speak for Apple, but watching their actions, I believe that their goal is to get back to one standard library implementation for Mac OS (and iOS) - and that will be libc++. I believe that sometime in the future, libstdc++ will no longer be part of Mac OS X.

    Can we mix system libc++ and manually built Clang libc++? If not, when will it cause trouble?

    I do this fairly regularly - but I don't replace the one in usr/lib. Instead I run specific programs after setting the environment variable DYLD_LIBRARY_PATH to point to my newly built libc++. Replacing the one in /usr/lib has the potential to brick your system. (if you break something in the dylib - or even just change the layout of std::string, say).

    0 讨论(0)
提交回复
热议问题