當我構建一個 iOS 專案時,我收到一個錯誤“找不到‘元組’檔案”。似乎 xcode 并沒有試圖尋找 c 頭檔案。
錯誤資訊是: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/include/simd/vector_make.h:5310:10: 'tuple' file未找到
在 vector_make.h 中,包含元組:
#include <tuple>
這源自包含在 c 檔案“tdav_apple.mm”中的 AVFoundation.h:
#if TDAV_UNDER_APPLE
#if TDAV_UNDER_IPHONE || TDAV_UNDER_IPHONE_SIMULATOR
#import <UIKit/UIKit.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AVFoundation/AVFoundation.h>
#endif
我該如何解決?謝謝你的幫助!
uj5u.com熱心網友回復:
我會檢查并確保你的語言版本至少是 C 11,因為那是元組被引入的時候。

如果我無法驗證 .mm 檔案在專案檔案中是否正確標記為 C (選擇檔案,然后打開右側的“檔案檢查器”內容。)

轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/380357.html
