Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

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

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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 Aug 18 '11 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. –  bcml Aug 19 '11 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 Aug 19 '11 at 22:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.