xcode 编译选项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2707319/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xcode compile options
提问by joels
I am compiling from the command line with
我正在从命令行编译
gcc -o output-file $(mysql_config --cflags) main.c $(mysql_config --libs)
How can I add the extra params to xcode compiling options?
如何将额外的参数添加到 xcode 编译选项?
gcc -o output-file $(mysql_config --cflags)main.c $(mysql_config --libs)
gcc -o 输出文件$(mysql_config --cflags)main.c $(mysql_config --libs)
回答by joels
Apple-I the project file, there is a section in build settings
Apple-I 项目文件,在构建设置中有一个部分
Other C Flags Other linker flags
其他 C 标志 其他链接器标志
If you are using Xcode >= 4 you need to click on the Project in the Navigator then click on the Target. Finally, click on the "Build Settings" tab. Type in the search field "other c" and you should see you fields there. If put "$(mysql_config --cflags) $(mysql_config --libs)" in one of the fields depending on what language you are using (c or c++).
如果您使用 Xcode >= 4,则需要在导航器中单击项目,然后单击目标。最后,单击“构建设置”选项卡。在搜索字段中键入“其他 c”,您应该会在那里看到您的字段。如果根据您使用的语言(c 或 c++)将“$(mysql_config --cflags) $(mysql_config --libs)”放在字段之一中。
回答by carmin
Using Xcode -- found offsetof(struct structureName, memberName) as a standard c function
使用Xcode——找到offsetof(struct structureName, memberName)作为标准c函数