Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Cocoa Frontend to C++ Project?

Cocoa Frontend to C++ Project?
Thread Tools
Mac Enthusiast
Join Date: Feb 2003
Location: Portland, Oregon
Status: Offline
Reply With Quote
Jul 2, 2004, 07:31 PM
I'm taking a computer graphics course this term and have decided to use C++ with OpenGL for my term project. I was going to use Carbon for my application's frontend, but would much rather use Cocoa. Is it possible to create a Cocoa frontend for a C++ project?

I've tried creating a new project in IB and then importing the NIB file into my C++ project. I then created a new Cocoa class and included the Cocoa library. Then I tried declaring a simple button object in that class, but I get mass compilation errors. IF this is possible, does anyone have any tips? I'm not looking for Cocoa tips, as I know the basics. I just need to know how to make the frontend bind to my C++ project.

jesse ;-)
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Jul 2, 2004, 09:47 PM
You are looking to use Obj-C++, where you can mix ObjectiveC and C++ freely. In order for them to talk back and forth you do have to make sure you are passing C items (not objects), but you can do a lot.

You should be bringing the C++ into the project, not the other way around.

Lookup Obj-C++ for more.
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Privacy Policy
All times are GMT -4. The time now is 04:38 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,