Re: How to change debug executable to a new path
Re: How to change debug executable to a new path
- Subject: Re: How to change debug executable to a new path
- From: Bob Harris <email@hidden>
- Date: Fri, 7 Apr 2006 18:30:44 -0400
Thanks Much, Chris,
I will try solution (b). Was going to try (a) but I do not find
<x-tad-bigger>CONFIGURATION_BUILD_DIR</x-tad-bigger> among the build settings (select project, hit blue i button, hit build, elect debug from configurations popup). Nor do I see anything set to
<x-tad-bigger>$(SYMROOT)/$(CONFIGURATION)</x-tad-bigger>. The most likely thing I do see is
<x-tad-bigger>Per-configuration Build Products Path</x-tad-bigger> which is set to
<x-tad-bigger>$(BUILD_DIR)/$(CONFIGURATION)</x-tad-bigger> . Am I looking in the right place?
And for solution (b), you must mean
<x-tad-bigger>defaults write com.apple.Xcode UsePerConfigurationBuildLocations NO</x-tad-bigger>
as that seems to be working for me, thanks.
Bob H
On Apr 7, 2006, at 11:35 AM, Chris Espinosa wrote:
On Apr 7, 2006, at 5:15 AM, Bob Harris wrote:
Have been using xcode 1.5 for some time to build "Command Line Utility:Standard Tool" projects (i.e. legacy unix CLI programs). Now have a new machine with xcode 2.2.
When I do "build and debug", xcode places the executable in the directory ./debug. How can I change this to just place it in . ? That is, the executable needs to end up in the same folder as the project.
The reason I need to do this is that the test files that my program operates on contain paths, and those paths are relative to the location of that file. For that and other reasons, it's impractical for me to move my test files into the debug folder.
I've searched emails on this mailing list and found a relevant thread:
http://lists.apple.com/archives/xcode-users/2005/Sep/msg00581.html
But it's not clear to me if this applies in my case. I have already managed to move the build path to where I want it, using "Place Build Products In:" on the projects info panel. I have that pointing at the same folder the project is in. This was enough to meet my need in xcode 1.5. This thread does not specifically mention debug. Another thread does, but the conclusion seemed to be that the user should move his files into the debug directory.
By going straight from 1.5 to 2.2 you've skipped over a number of dramatic changes in 2.0 and 2.1. I suggest you read up on "Build Configurations"in the Xcode User Guide.
Starting in 2.1, Xcode stores the built products (and intermediates) for different configurations separately, so that when you build Release you don't blow away your Debug version, for example. You can change this two ways:
a) Set the <x-tad-bigger>CONFIGURATION_BUILD_DIR </x-tad-bigger>build setting to <x-tad-bigger>$(SYMROOT). </x-tad-bigger>This restores Xcode 1.5 behavior, but when you build your Release target it will replace your Debug version. The default is<x-tad-bigger> $(SYMROOT)/$(CONFIGURATION</x-tad-bigger> which provides the behavior you're seeing.
b) At the Terminal, set <x-tad-bigger>defaults write com.apple.Xcoode UsePerConfigurationBuildLocations YES . </x-tad-bigger>This restores 1.5 behavior for all projects opened by your user login (it's a user-level preference).
Chris
_______________________________________________
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