1

I've got a handle on how to install Xcode 3 and 4 on the same machine (running OS X < 10.7), so I'm looking more how to manage this environment.

Rather: is it possible to enter some shell command to "point" to the Xcode version you would like to use for a certain task?

For example, some packages in Homebrew seem to have issues with Xcode 4 compilers (multiple -arch flags not supported any longer etc.). So, when I want to brew install something, I would like to use the old Xcode 3 gcc suite. But when doing actual Cocoa development, I would rather like to use Xcode 4.

RVM also does a nice job of managing work in multiple environments. I think, newer Linux distributions offer a tool called update-alternatives to achieve such a goal. Just to give you more of an idea of what I am talking about.

Similar to running both simultaneously except I'm looking to use them sequentially.

2
  • Forgive the heavy handed edit. I wanted to emphasize how detailed you crafted this to avoid any confusion with the linked question.
    – bmike
    Commented Aug 18, 2011 at 22:32
  • No prob, thanks for the effort. And thanks for the pointer to RVM, might be useful in the future.
    – mats
    Commented Aug 19, 2011 at 21:54

1 Answer 1

1

I believe you can only have one version of the command-line tools installed at the same time, and I believe it says this during the installation process, so you won't really be able to switch between them.

3
  • This might be manageable with shell functions to automate changes to $PATH - Xcode 4 now drops it's command line in /Developer/usr/bin (see this question) If @stamineus installs Xcode 3 smartly, they might coexist much nicer than the named applications Like Xcode and Instruments will as they are likely to fight over who opens the same UTI / file type.
    – bmike
    Commented Aug 18, 2011 at 22:35
  • OK, +1 for the info, although it being a disappointing one. If there won't turn up any positive solutions, I will accept this as an answer.
    – mats
    Commented Aug 19, 2011 at 21:57
  • @bmike: It does look like I have stuff in /Developer/usr/bin, but I also have it in /usr/bin (I do also happen to have Xcode 3 installed; maybe that's why) and /Developer/usr/bin isn't in my $PATH...
    – jtbandes
    Commented Aug 19, 2011 at 22:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .