1

When I built an iOS project, I got an error "'tuple' file not found". Seems xcode is not trying to look for c++ header files.

The error message is: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/include/simd/vector_make.h:5310:10: 'tuple' file not found

In vector_make.h, tuple is included:

#include <tuple>

This is originated from AVFoundation.h included by a c++ file "tdav_apple.mm":

#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

How can I fix it? Thanks for your help!

1
  • 2
    You must target C++11 or later to have access to <tuple>. Commented Dec 14, 2021 at 2:09

1 Answer 1

2

I'd check and make sure your language version is at least C++11, since that's when tuple was introduced.

Snap of relevant build setting row

Failing that I'd verify the .mm file is properly tagged as C++ in the project file (select the file, then open the right hand side "File inspector" thing.)

Detail of file inspector

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.