Re: Custom Working Directory not working for me...
Re: Custom Working Directory not working for me...
- Subject: Re: Custom Working Directory not working for me...
- From: Fritz Anderson <email@hidden>
- Date: Mon, 14 Nov 2011 13:37:29 -0600
On 14 Nov 2011, at 8:49 AM, David Hoerl wrote:
> Maybe someone can help shed light on this. Xcode 4.2 (Lion), building a command line utility. I want a specific working directory for it, so I go to the scheme menu and set one. It's not having any effect.
>
> I added this line to main.c, the first executable line:
>
> printf("CWD=%s\n", getcwd(NULL, 100) );
>
> What it prints out is "CWD=/"
>
> I'm using a Release build no debugger. I even copied the directory from the custom working directory and did a "ls" on the string just to convince myself it was correct (I used the popup control to set it initially).
>
> I closed and reopened the project, shut down and reopened Xcode, no change.
I'll start with the dumb questions…
Could you clarify how you're running the tool? I assume it's from Xcode, as it obviously can't attach a working directory path to an independent executable.
Are you using Xcode's Run action (Product > Run, cmd-R, or the triangle manifestation of the action button)? Are you sure you're editing the Options tab of the Run panel in the Scheme editor? Is the scheme (both in the toolbar and the Scheme editor) set for the tool and your destination machine?
What happens when you set the Build Configuration to Debug?
What happens if you hold down the option key while triggering the Run action, and set the working directory from the Scheme editor that appears before the run?
— F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden