Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set Carbon or Cocoa Project to use C++



On Jan 19, 2006, at 5:24 PM, Jesse Carpenter wrote:

If C++ is used for its capability of using operators, how would I create a C++ project (carbon, cocoa, etc) when using XCode?

Xcode chooses compilers for your project by file type as indicated by the file suffix or the setting in the Info window for that file.


If I create a carbon project, do I simply change the suffix of the source files from C to C++? How would I do it for Cocoa projects?

Yes, if you change the suffix of a file to one Xcode recognizes as C+ +, it will build that file with the specified C++ compiler.


Cocoa is not a C++ API, but you can mix C++ and Objective-C at the statement level via Objective-C++. The source file for this hybrid language is ".mm".

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Set Carbon or Cocoa Project to use C++ (From: "Jesse Carpenter" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.