[英]no member named 'isinf' in the global namespace
我在 Mac 上編譯幾乎任何東西時都遇到問題(包括例如 xgboost),這表明問題不在於單個項目,而在於我的機器上出現了問題。 我團隊中的其他人可以很好地編譯。
當我嘗試編譯時,出現如下錯誤:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:317:9: error: no member named 'isinf' in the global namespace
using ::isinf;
都是cmath
中的問題。
我有:
cmake
是否是最新的。xcode-select --install
完全刪除並重新安裝命令行工具sudo xcode-select --reset
make configure
輸出與同事進行比較 - 它是相同的,所有工具/庫的所有版本也是如此brew
中任何看起來有問題的東西 - 看不到任何東西。 沖泡醫生說我可以沖泡了(一切都很好)。我在 GitHub 或此處發現的任何問題都沒有指向問題根本原因的答案。
這里發生了什么? 至少,我在哪里可以尋找更多的線索?
您可以嘗試使用 CommandLineTools SDK 而不是 XCode.app SDK。 運行“xcode-select --reset”將使 macOS 回退以使用 XCode.app SDK。
#Check the current sdk
xcrun --show-sdk-path
#Change sdk
sudo xcode-select -s /Library/Developer/CommandLineTools #Using CommandLineTools SDK
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer #Using XCode.app SDK
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.