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

前端 未结 2 1362
离开以前
离开以前 2021-02-09 02:34

I have a command-line executable in Xcode.

I am using Xcode 5.1. In the \"Scheme Editor\" for the project under \"Options\" there is an option for \"Working Directory\".

2条回答
  •  甜味超标
    2021-02-09 03:11

    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.

    Screenshot of Xcode Derived Data location diaglog

提交回复
热议问题