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++



if u want to include a class in a .mm or a .m file that is defined in a .cpp file or vice versa, u will need to set the compile source as setting to Objective-C++ so it will just compile everything as Objective-C++. the compiler would in essence be treating all your files as if they had a .mm extension in this case.
 
otherwise if the comiple as source setting is set to according to file extension then a .cpp file will be compiled as C++ and a .mm file will be compiled as Objective-C++. the C++ compiler and the Objective-C++ file are not the same, or maybe i should say the files would not be compiled as the same language.
 
jamie

Jesse Carpenter <email@hidden> wrote:
> -- Chris wrote
>Cocoa is not a C++ API, but you can mix C++ and Object! ive-C at the
>statement level via Objective-C++. The source file for this hybrid
>language is ".mm".
>

One simple question about mixing C++ with Objective-C. Is the C++ suffix
.cpp ever used or all source files must use the Objective-C Suffix? I assume
that when you said hybrid, all source files use the Objective-C Suffic .mm.

Thanks Jesse

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________
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


Yahoo! Photos
Got holiday prints? See all the ways to get quality prints in your hands ASAP.
 _______________________________________________
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: 
 >Re: 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.