0

我将我的应用程序设置为在编译器版本下的目标>构建设置中使用 LLVM GCC 4.2,它适用于模拟器。

当我将“方案”切换到 iPad 时,它会发出与使用 GCC 时相同的警告,所以我假设它现在正在 GCC 下编译。但是“C/C++ 编译器版本”目标仍然设置为 LLVM GCC 4.2(iOS 默认除外,它是 GCC 4.2,我无法更改)。

为什么它不再使用 LLVM GCC 编译,我该如何更改它,使其在 iPad 下运行?

编辑:我得到的错误与访问超类的实例变量有关。如果您没有将其写为 [self iVarName],则 GCC 会出错,而如果您只使用 iVarName,则 LLVM GCC 可以正常编译。

4

1 回答 1

-1

LLVM GCC is te LLVM preprocessor with the GCC compiler, so you should see the same error messages (and a few more in the IDE thanks to LLVM). You could try the LLVM Compiler 2.0, but it has a few bugs at the moment. To set the compiler, choose the project at the top left, tap the Build Settings tab and change the compiler.

于 2011-03-30T19:26:35.403 回答