如何添加“其他链接标志”用命令行来xcode项目? [英] How to add "Other Linker Flags" to xcode project using command line?

查看:127
本文介绍了如何添加“其他链接标志”用命令行来xcode项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试自动化xcode项目的构建过程。问题是我需要在构建项目时添加Other Linker Flags。我不能手动将它添加到项目构建设置,我必须使用命令行。
可能我可以以某种方式编辑项目文件或配置文件?
任何选项都是好的,只要它可以作为脚本运行。
有什么想法吗?谢谢

I'm trying to automate building process of xcode project. The problem is that I need to add "Other Linker Flags" when building the project. I can't just add it to the project Build Settings manually, I have to do it using the command line. May be I can edit the project file or configuration file somehow? Any options are good as long as it can be runned as a script. Any ideas? Thanks

推荐答案

您可以通过为xcodebuild指定xcconfig文件来完成此操作。例如:

You can do this by specifying an xcconfig file to xcodebuild. For example:

echo 'OTHER_LDFLAGS = $(OTHER_LDFLAGS) -force_load "$(SRCROOT)/calabash.framework/calabash" -lstdc++' > temp.xcconfig
xcodebuild -xcconfig temp.xcconfig ...

这篇关于如何添加“其他链接标志”用命令行来xcode项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆