Configuring XCode 3.2 to support an alternative compiler

Joined
Sep 29, 2010
Messages
3
Reaction score
0
Points
1
Say I have a compiler GCC4.4 in
/sw/bin/gcc-4

How do I configure XCode to be able to select this compiler? If at all possible.

I have OS X 10.6.7 and XCode 3.2.6.
 
Joined
Oct 26, 2009
Messages
128
Reaction score
8
Points
18
Question, is there any reason why you can't use /usr/bin/gcc instead? It's gcc 4.2.

I switched to xcode 4 so I'll explain it with version 4. You can always upgrade. The process might be a little different in 3.2, not sure.

You can switch the compiler in xcode 4 by going to the Build setting for your target. One of the options is Compiler Version and you can switch it from LLVM compiler 2.0, the default in xcode 4, to gcc 4.2 which will target /usr/bin/gcc.

You can also create a project with an External Build System and use make. That will give you full control of the build and you can use whatever you want for compiler but that's a lot more work.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top