在 Mac 上更新 libstdc++

在 Mac 上更新 libstdc++

當嘗試在 Mac OS X 10.8.5 上編譯最新版本的 LLVM 時,我收到以下有關 libstdc++ 版本的錯誤/警告:

===
checking whether Clang will select a modern C++ standard library... no
configure: error:
We detected a missing feature in the standard C++ library that was known to be
missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
than 4.7. You will need to update your system and ensure Clang uses the newer
standard library.


===

我找不到任何有關如何更新 libstdc++ 的明確資訊。 A類似的帖子我發現沒有幫助。

更新 libstdc++ 最終會破壞很多其他東西嗎?

如果相關的話,我已經安裝了自製程式並且想避免使用 macports。

答案1

事實證明我不需要探索 macports 來解決這個問題。 Mac-OSX 10.8 已經安裝了 libc++,並且可以透過enable-libcpp在配置階段使用該標誌來要求 llvm 使用 libc++ 而不是 libstdc++ 。

相關內容