 |
 |
Creating C++ GUI Applications
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2006
Location: London, UK
Status:
Offline
|
|
Hi,
I'm learning C++, and I've had some experiance on a Windows machine before. I'm interested in creating a GUI application (not a console, so something with buttons, menu bars etc..) but I was wondering how I could do it. With Windows you can use the Win32 API, and I was wondering what the equivilent was for Mac. Can it be done with C++ on OS X. I'm using Xcode on 10.4.7. When I start a new program, I select C++ Tool from Command Line Utility. Is this what I should be doing if I want to create a GUI app with C++?
Thank you very much for any suggestions!
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Try making a Carbon Application (which uses the Carbon API). The "* Tool" project styles refer to command-line programs.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2006
Location: London, UK
Status:
Offline
|
|
I'm not so sure what Carbon is. Is it written in the C++ Language or not? Thanks for the quick reply!
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Carbon is an API for graphical applications. It's written in C, but it's perfectly compatible with C++. Apple has documentation on its developer site.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2003
Status:
Offline
|
|
carbon is equivalent to the win32 API. neither are C++, you would have to wrap both in C++ classes. didn't code warrior have a C++ API?
|
|
I am now going to tell the computer what he can do with a life-times supply of chocolate.
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally Posted by KEL9000
carbon is equivalent to the win32 API. neither are C++, you would have to wrap both in C++ classes. didn't code warrior have a C++ API?
Yeah, it did. It was called PowerPlant, and it's old and crufty.
If you want to create GUI applications on OS X, you almost certainly want to use Cocoa. Even if you're creating a modern Carbon application on OS X, you'll have to use some Cocoa for things like Core Image.
Learn Objective-C. Learn Cocoa.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Feb 2003
Location: USA
Status:
Offline
|
|
I agree with Angus_D IF you really want to create OS X GUI applications. Having said that, if you are really interested in C++, perhaps for educational purposes or maybe wanting to write Windows apps one day, you can intermix C++ with Objective-C.
The Objective-C Programming Language: Using C++ With Objective-C
But then you're learning two languages at the same time, which may confuse you.
What are your ultimate goals in programming?
|
|
MacBook 2.0 160/2GB/SuperDrive
Lots of older Macs
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
I reckon Carbon is most similar to the Win32 API, which is what he wanted, though I agree Cocoa is generally better.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|