簡體   English   中英

全局命名空間中沒有名為“isinf”的成員

[英]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完全刪除並重新安裝命令行工具
  • 完全刪除 XCode 並運行sudo xcode-select --reset
  • 將我的make configure輸出與同事進行比較 - 它是相同的,所有工具/庫的所有版本也是如此
  • 檢查brew中任何看起來有問題的東西 - 看不到任何東西。 沖泡醫生說我可以沖泡了(一切都很好)。
  • 檢查我的 MacOS SDK 是否正常,它是 (10.15)

我在 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM