C++/carbon

Member
Posts: 75
Joined: 2009.01
Post: #1
Hi.
After struggling tremendously with Objc, i decided to program in c++ since i heard it was possible.
My main goal is to program games/apps for the iphone but after finding out that i could code completely in c++ (almost) for my apps, it lead me to something called carbon.
what's carbon?
Also, what are wrapper codes?
Since I need SOME objective-c to apparently "wrap" my c++ code to make them work on iphone.

I've decided to learn OpenGL and c++ on a PC and then transfer to MAC using c++ and openGLES with a bit of ObjC using xCode.
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #2
Carbon is an obsolete Mac application development framework. You can't use it on the iPhone.

If you want to use C++ on the iPhone you can; search the docs for Objective-C++. You still need some wrapper code. Someone here can probably tell you more about it.
Quote this message in a reply
Member
Posts: 75
Joined: 2009.01
Post: #3
ah~
that makes sense.
I wasn't finding anything about carbon on iphone.
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #4
When you hear about "wrapper code" in this context, all it means is an isolated part of your codebase which interfaces with the system in some way that the rest of your code doesn't. For example, you could write your entire project in C except for a small Objective-C bootstrapper that does things like handle NIB connections, call the main Cocoa run loop, manage windows and menus, etc., while the rest of your code (in C) does the real work.
Quote this message in a reply
Member
Posts: 75
Joined: 2009.01
Post: #5
I am so happy to hear that!
Although I will be coding in ObjC in the future, i preferred to do some projects in C++.
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2009.03
Post: #6
Egads, Carbon is not obsolete, stop spreading lies. While Apple may prefer developers to use Cocoa/Obj C, they still fully support Carbon development.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #7
Sorry RedWolf, but you are mistaken. Carbon is indeed obsolete and it is not fully supported by Apple anymore, and they have made it clear that they do not intend to develop Carbon into the future. One example of its obsoleteness is that you cannot use Carbon to build a 64 bit application. These are not "lies". Wink

... and no, you cannot use Carbon on iPhone either.
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2009.03
Post: #8
AnotherJake Wrote:Sorry RedWolf, but you are mistaken. Carbon is indeed obsolete and it is not fully supported by Apple anymore, and they have made it clear that they do not intend to develop Carbon into the future. One example of its obsoleteness is that you cannot use Carbon to build a 64 bit application. These are not "lies". Wink

... and no, you cannot use Carbon on iPhone either.

You can build 64-bit applications in Carbon just that you must use Cocoa for the UI.

http://developer.apple.com/documentation...ction.html

In that document under the section "Choosing a Development Path for Your Carbon User Interface" it states:

"Apple plans to support and maintain the 32-bit Carbon Human Interface Toolbox, although Apple will not be adding any significant new features to these APIs."

While I suspect that at some point in the future Apple might finally EOL all support for Carbon, I don't foresee it any time soon. Of course, Apple will taunt Carbon developers by releasing new features and capabilities only for the 64-bit APIs and Cocoa.

Sorry, but I disagree with your definition of "obsolete". MPW is obsolete.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #9
Quote:If you want to create a 64-bit application for Mac OS X, you need to use Cocoa to implement its user interface.

That quote right there is plenty good enough by most standards, to indicate that Carbon is obsolete. Further, as you quoted yourself, about Carbon:

Quote:Apple will not be adding any significant new features to these APIs.

Yet another statement indicating it is obsolete. The only reason they are continuing to support it at all is so that companies like Adobe who have massive code-bases written in Carbon and are too slow to adopt Cocoa can continue to ship their old products. Make no mistake about it, Apple does not recommend developing new applications in Carbon. These factors add up to one thing, to most of us: Carbon is obsolete.

You can disagree about the definition of "obsolete" all you want, but you are in the distinct minority when you argue that Carbon is still a viable and valid API to develop applications with.
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #10
Maybe if we use the word "deprecated", there would be less disagreement.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #11
Both terms could easily be argued to be relevant to Carbon IMHO.

obsolete |ˌäbsəˈlēt|
adjective
1 no longer produced or used; out of date

deprecate |ˈdepriˌkāt|
verb [ trans. ]
1 express disapproval of

- Carbon cannot be used on iPhone, which is what this thread is about. -- fits the definition of obsolete

- Carbon is no longer "produced" in that Apple will no longer be adding any significant new features to it. -- fits the definition of obsolete

- Carbon is no longer "used" at all in 64 bit UI's. -- fits the definition of obsolete

- Carbon is also not used much, if at all, by most of the developer community for new applications. In a practical sense, if you post questions about Carbon here, there aren't many of us who use Carbon enough anymore to help. -- fits the definition of obsolete

- Apple's official word is that they recommend using Cocoa for all new applications. However, I have not seen them specifically express *disapproval* of Carbon, other than by the action of not carrying Carbon forward into the 64-bit future (at least specifically with the UI), and not adding significant new features to it. So it sure appears to be deprecated when looking at it from a common sense standpoint, but it isn't *officially* deprecated by Apple as far as I've seen.
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #12
For some reason deprecated functions are always easy to use and work perfectly, while the non-deprecated version is usually a mess. It's like "no, dude, this is way too easy, be a man and do it the hard way".

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 624
Joined: 2007.09
Post: #13
Najdorf Wrote:For some reason deprecated functions are always easy to use and work perfectly, while the non-deprecated version is usually a mess. It's like "no, dude, this is way too easy, be a man and do it the hard way".

Like what? Huh

- Lincoln Green
http://www.binkworks.com/
Quote this message in a reply
Moderator
Posts: 1,562
Joined: 2003.10
Post: #14
Najdorf Wrote:For some reason deprecated functions are always easy to use and work perfectly, while the non-deprecated version is usually a mess.

If this is actually the case with any current Apple API and not just a baseless generalization, you should file a bug report with Apple about it. That's how they get developer feedback to know what needs improvement.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #15
RedWolf Wrote:You can build 64-bit applications in Carbon just that you must use Cocoa for the UI.
I believe that you are confusing some of the terms. You can build 64 bit applications in C or C++, just that you must use Cocoa for the UI. Carbon is the C-based library for the UI and other Mac-specific elements, and has nothing to do with the language itself. You can still compile 64 bit C and C++ code, and link to 64 bit C and C++ libraries, including built-in libraries such as the C standard library and OpenGL, but that has nothing to do with Carbon.
Quote this message in a reply
Post Reply