升级到Xcode 9/10后,无法编译旧项目:GLKit / common.h

时间:2019-01-18 08:38:30

标签: ios xcode glkit

我有一个需要更新的IOS项目。 它在Xcode 8中可以正常工作,但是升级到Xcode 9或10(都尝试过)后,它将不再编译。

common.h中包含的文件“ GLKit.h”中出现“预期的非限定ID”解析错误。

出现错误的行如下:

} /* extern "C" */

我认为可能是一个},但是我什至无法编辑该文件,因为它属于apples库并且是只读的。

如果我回到Xcode 8,它可以立即再次工作。

1 个答案:

答案 0 :(得分:0)

我发现发生了什么事。我有一个

#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))

somewhere. This messed up with something in the common.h
Defining this after the include of the common.h solved the problem.
I dont know why this only happens on XCode 9+