How to add “Other Linker Flags” to xcode project using command line?

穿精又带淫゛_ 提交于 2019-11-30 08:57:15

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 ...

@Jesse Rusak's answer works, but it is a bit simpler to directly add options to the command line, being careful to escape variables from your shell like

xcodebuild ... "OTHER_LDFLAGS=\$(OTHER_LDFLAGS) -all_load"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!