• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom Working Directory not working for me...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Custom Working Directory not working for me... (From: David Hoerl <email@hidden>)

  • Prev by Date: XCode 4.2 debugger fails to show proper local variable states
  • Next by Date: Re: XCode 4.2 debugger fails to show proper local variable states
  • Previous by thread: Custom Working Directory not working for me...
  • Next by thread: Xcode crash to open .xib file
  • Index(es):
    • Date
    • Thread