Build Error in GameKit.framework on XCode 8

Asked 5 months ago, Updated 5 months ago, 14 views

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/ 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

2022-09-30 11:25

1 Answers

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.

2022-09-30 11:25

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.