Using a different compiler?

boyfarrell

Registered
Hello everybody,

Following on from a post in December about the GCC 4 compiler supplied with MacOS. Is it possible to use another one?

I believe there to be a mistake with how the compiler is treating long double math functions such as expl and sinhl etc in math.h. These functions return the same value as there float counterparts, i.e. exp and sinh.

Is there away I can use another compiler on MacOS that can get round this?

Dan.
 
You can tell Xcode to use gcc 3.3 instead of 4.0. To set the compiler Xcode uses for your project,

  1. Select the target from the Groups and Files list.
  2. Click the Info button in the project window toolbar to open the target's inspector.
  3. Click the Rules tab in the inspector.
  4. There is a System C Rule that is set to compile C files with gcc 4.0. Change it to use gcc 3.3.
When you change the System C Rule, you'll be asked to make a copy of the rule. Make the copy.
 
Back
Top