I would like to add two compiler flags, one for ARC (-fno-objc-arc) and one for warning (-w). Anybody know how to add two compiler flags in the Xcode build phase for a particular file?
我想添加两个编译器标志,一个用于ARC(-fno-objc-arc),另一个用于警告(-w)。有人知道如何在特定文件的Xcode构建阶段添加两个编译器标志吗?
4 个解决方案
#1
24
Add the compiler flags under your Project -> Target -> Build Phases, just separate the flags by a space.
在Project - > Target - > Build Phases下添加编译器标志,只需用空格分隔标志。
#2
5
In Xcode, clic on your project file to see the pane with your target(s) and then :
在Xcode中,clic在项目文件中查看包含目标的窗格,然后:
- Select the "Build Phases" tab
- 选择“构建阶段”选项卡
- Unfold "Compile sources"
- 展开“编译源”
- Search for your specific file
- 搜索您的特定文件
- Set your compiler flags on this particular file by double-clik on this column.
- 通过此列上的双重clik在此特定文件上设置编译器标志。
Hope this helps
希望这可以帮助
#3
0
Select your project in the project navigator in the left-hand panel, select your target, then select Build Phases. Expand Compile Sources and double-click the file you want to set the compiler flag for. Repeat for each target you want the changes to apply to.
在左侧面板的项目导航器中选择项目,选择目标,然后选择Build Phases。展开“编译源”,然后双击要为其设置编译器标志的文件。对要应用更改的每个目标重复此操作。
#4
0
- Select blue project file
- 选择蓝色项目文件
- Select "Build phases".
- 选择“构建阶段”。
- Disclose "Compile Sources".
- 披露“编译来源”。
- Double click on file that you want to add flags.
- 双击要添加标志的文件。
- Then set flags separated by space.
- 然后设置由空格分隔的标志。
#1
24
Add the compiler flags under your Project -> Target -> Build Phases, just separate the flags by a space.
在Project - > Target - > Build Phases下添加编译器标志,只需用空格分隔标志。
#2
5
In Xcode, clic on your project file to see the pane with your target(s) and then :
在Xcode中,clic在项目文件中查看包含目标的窗格,然后:
- Select the "Build Phases" tab
- 选择“构建阶段”选项卡
- Unfold "Compile sources"
- 展开“编译源”
- Search for your specific file
- 搜索您的特定文件
- Set your compiler flags on this particular file by double-clik on this column.
- 通过此列上的双重clik在此特定文件上设置编译器标志。
Hope this helps
希望这可以帮助
#3
0
Select your project in the project navigator in the left-hand panel, select your target, then select Build Phases. Expand Compile Sources and double-click the file you want to set the compiler flag for. Repeat for each target you want the changes to apply to.
在左侧面板的项目导航器中选择项目,选择目标,然后选择Build Phases。展开“编译源”,然后双击要为其设置编译器标志的文件。对要应用更改的每个目标重复此操作。
#4
0
- Select blue project file
- 选择蓝色项目文件
- Select "Build phases".
- 选择“构建阶段”。
- Disclose "Compile Sources".
- 披露“编译来源”。
- Double click on file that you want to add flags.
- 双击要添加标志的文件。
- Then set flags separated by space.
- 然后设置由空格分隔的标志。