On Thu, Jul 19, 2012 at 2:32 PM, Roland King
<email@hidden> wrote:
Doesn't work quite like that. You really wouldn't want Xcode stuffing random development code in /usr/local/bin every time you built it now would you. Xcode keeps all the built product in wonderfully segregated directories, segregated by platform, debug and release etc etc. So when you build a debug version of your app, it doesn't go stomp on the release one you built last month.
If you look at the build log (it's one of the tabs on the organizer), it's quite easy to find where it built what it ran in your debug session, for instance I have a PNG splitter, I just looked, it's here
I'm sorry I can't find a build log in the organiser. I opened the organiser by clicking
on a little button that looks like a filing cabinet in the top right hand corner of the xcode screen
a thing called organiser opens. It has 5 icons on the top bar calleddevices, repositories,projects archives and documentation.
I searched for "build log" in the xcode help - it returned 27 system guides 9 tools guide and 26 entries in sample code - but sadly I still can't find this information.
The guide "Building and running apps" talks about the "base SDK"
and their is an illustration referring to ioS4.3 - in fact the documentation at this point never
mentions Mac os x - strange since I'm developing on mac os x for mac os x and have no interest in
ioS. The entire "Building and running apps" seems to be write from the POV that I'm developing for an
ipad or iPhone - but I'm not.
~/Library/Developer/Xcode/DerivedData/PNGSplitter-ffmwyfapmkxfyggauphujryjzelm/Build/Products/Release/PNGSplitter
and I have a Debug version too, I think you can guess where that is. I believe that's a fairly default location, I don't remember messing with it.
So you can copy that if you like, b /Users/joe/Library/Developer/Xcode/Archives/2012-07-19/test1 7-19-12 3.21 PM.xcarchive ut a better idea is to go to the product menu and select 'Archive'. That will build you a release (by default) version of your app and it will archive it into a package, you can then find that package in the Archives tab in Xcode (if you have the correct setting it even takes you right there). Inside that is an Info.plist file and the usr/local/bin (and usr/local share) you expected.
OOOhhh. I pressed Product -> Archive and it created a directory called
/Users/joe/Library/Developer/Xcode/Archives/2012-07-19/test1 7-19-12 3.21 PM.xcarchive
and my executable was in
/Users/joe/Library/Developer/Xcode/Archives/2012-07-19/test1 7-19-12 3.21 PM.xcarchive/Products/usr/local/bin/test1
Is this somebodies idea of a joke ?
(I know, let's confuse the users by hiding their executables where nobody can find them ...(
Once you get to that point I'm err not totally sure if there is something you can do to install that to /usr/local/bin, apart from just copy it, I just copy them myself. If there's a way to click and install, I don't know what it is. An Xcode guru will now completely embarrass me my pointing out a button I've missed. To see the contents of a package, just right click and select 'show package contents'
It would be nice if one didn't have to resort to desparte cries of help of help to mailing lists
for this. IMHO information like "where the **** is my executable" should be somewhere near the top
of the documentation.
The principle of least surprise who suggest that the directory in which I might find the executable
of a program is the same as where I compiled the source code.
(did Xcode 4.3 escape before anybody had tested it for usability?)
Just call me a grumpy old man :-)
Cheers
/Joe
On Jul 19, 2012, at 7:52 PM, Joe Armstrong wrote:
> Hello,
>
> I'm trying to learn how to use xcode, and I can't even get the
> simplest thing to work. I'm running with a clean "out of the box" install.
> The software in question is
>
> Machine : MacBook Pro
> OS version lion: 10.7.4
> Xcode : 4.3.3
>
> My problem is that I have a command line program that works *within* xcode
> when I hit the run button, but does not create an executable that I can run
> *outside* xcode.
>
> I am totally flummexed. Here's what I did.
>
>
> 1) File -> New -> Project
> selected "Command Line Tool"
> name: test1
> Type: foundation
> Use automatic Reference Counting is ticked
>
> 2) This creates main.m
>
> #import <Foundation/Foundation.h>
>
> int main(int argc, const char * argv[])
> {
>
> @autoreleasepool {
>
> // insert code here...
> NSLog(@"Hello, World!");
>
> }
> return 0;
> }
>
> 3) Press the run button
>
> It says build succeed and runs correctly
>
> Now comes my problem - I want to run the program *outside*
> xcode from a terminal, bit no executable has been produced.
> Or if it has I can't find it.
>
> The Targets->Build Settings -> Deployment tab
> says the installation directory is /usr/local/bin
> so I had expected an executable called test1 to be
> in the file /usr/local/bin/test1
>
> /Joe
>
> _______________________________________________
> 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
_______________________________________________
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