I use GameKit on iOS to create an app that uses the ranking function of GameCenter.
The language used is Objective-C.
I was able to run the app through the build to Xcode7.
When I build with Xcode 8, I get a build error with a file that is not my own.
Lexical or Preprocessor Issue Group
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionEventListener.h:23:102: Too few arguments provided to function-like macro invocation
The error is occurring in
in GKGameSessionEventListener.h+(void)addEventListener:(NSObject<GKGameSessionEventListener>*)listener NS_SWIFT_NAME(add(listener:))NS_AVAILABLE(10_12,10_0)_WATCHOS_PROHIBITED;
This is the part.
Is there any way to avoid this build error?
ios objective-c xcode iphone
I solved myself.I don't know if I can help you, but I'll let you know.
I was defining a macro add for myself.
#define add(data,val,limit){ if(++data>=limit)data=limit;}
You have commented out this add.
As a result, this build error no longer appears.
© 2024 OneMinuteCode. All rights reserved.