XCode 4 Command-line application build location?

Discussion in 'Mac Programming' started by NickVellios, Mar 24, 2011.

  1. macrumors member

    Joined:
    Jun 6, 2010
    #1
    In Xcode 3, if you build a command-line application in C++, it compiles to a folder in the project folder and you can run it. In Xcode 4, I have not been able to figure out where it builds to. I searched my Mac, dug around in all the settings, but there is no binary. I can run the application, but no binary to be found.

    What the...?
     
  2. macrumors member

    Joined:
    Jul 4, 2010
    #2
    Check ~/Library/Developer/Xcode/DerivedData. Or set the build location in the preferences under "Locations" (hope it works, haven't really checked it out myself). I don't quite understand why the product isn't placed in the projects folder by default (while I sort of understand the use of the ~/Library folder).
     
  3. macrumors 603

    Joined:
    Aug 9, 2009
    #3
    Xcode 4 has a different build output location than Xcode 3.

    Did you read the Xcode 4 Transition Guide? The Xcode 4 User Guide?

    If not, you should.

    Xcode 4 Transition Guide:
    http://developer.apple.com/library/mac/#documentation/IDEs/Conceptual/Xcode4TransitionGuide/

    Xcode 4 User Guide:
    http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/

    Xcode Quick Start Guide:
    http://developer.apple.com/library/mac/#documentation/IDEs/Conceptual/xcode_quick_start/


    If you don't have a compelling requirement that can only be fulfilled by Xcode 4, you should probably just use Xcode 3 for real work, and use Xcode 4 only to learn how it works.
     
  4. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    You can get the XCode 3 build behaviour by changing Build Location under Locations in Preferences from the default "Place build products in derived data location" to "Place build products in locations specified by targets".
     

Share This Page