Xcode: How to set current working directory to a relative path for an executable?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 07:29:27

You can use Xcode build setting variables such as PROJECT_DIR, e.g. setting your working directory to $PROJECT_DIR/.. will make it equal to the parent directory of your project directory.

In Xcode preferences you can change the location of the compiled binaries to be relative to your project, or at any absolute path you like. Go to Preferences->Locations and then click on the Advanced... button below the Derived Data text field.

In the sheet that pops up set the Build Location to Custom, and then select the desired option in the nearby dropdown, and enter whatever paths you like in the Products field.

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