Re: Using different compilers for C vs C++?
Re: Using different compilers for C vs C++?
- Subject: Re: Using different compilers for C vs C++?
- From: "Sean McBride" <email@hidden>
- Date: Wed, 17 Mar 2010 19:08:29 -0400
- Organization: Rogue Research Inc.
On 2/18/10 7:15 PM, Jean-Daniel Dupas said:
>> - create new project from Cocoa Application stationary
>> - add a .c file
>> - add a .cp file
>> - put the following in both:
>>
>> #if __GNUC_MINOR__ == 0
>> #warning gcc 4.0
>> #elif __GNUC_MINOR__ == 2
>> #warning gcc 4.2
>> #endif
>>
>> First I changed between gcc 4.0 and 4.2 by changing GCC_VERSION, this
>> worked as expected.
>>
>> Then I:
>> - went to the target setting > Rules
>> - I changed the C rule, it said I need to make a duplicate, fine
>> - it added a new item to the top of the list, fine
>> - I set "Process" to "C++ source files" and "using" to "GCC 4.0"
>> - close the window
>> - clean all
>> - quit & relaunch Xcode
>> - build
>> - examine compiler warnings -> it's still using gcc 4.2
>>
>> I hope I'm just missing something obvious here....
>
>Damned, your right. It's broken. I tried with gcc-4.2 and llvm-gcc-4.2
>the last time (as the project I used to test does not compile with
>gcc-4.0) and this combination works.
Interesting.
>But I don't found a way to tell Xcode to use gcc-4.0 to compile C++ code.
Actually, what I'm really trying to do is use my own build of clang,
using this technique:
<http://shapeof.com/archives/2010/01/using_the_latest_llvm_with_xcode.html>
The problem is that clang now partly supports C++ but it barfs on all
my .mm files, and so I want to use Xcode's llvm-gcc to build C++ and my
own build of clang to build everything else.
But I can't seem to get it to work. :(
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden