Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rinseout

macrumors regular
Original poster
Has anybody here written an application that does the GUI stuff using Cocoa/Obj C, but does all of the real work in C++ code?

I know it's possible to, for example, link a program that with both Fortran and C objects, but is it possible to do this with Obj C and C++ together? It must be since it would be silly to re-write a C++ code base just to get a native app going. I guess the questions are: is it possible to do (in principle), and will XCode handle it easily?

I have no existing Obj-C code, so if this is possible, is there a good way of going about doing this without making coding style people freak out?
 
There are a few possible ways of doing this (although I have not done any of them).

Apple's gcc allows for Objective C++, a kind of bridge between the two. This would result in a single executable.

You could also run the C++ as a sperate non-GUI executable and use the standard methods for wrapping a command line app to provide the GUI.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.