How do I create and use Objective-C objects in a C++ program

Discussion in 'Mac Programming' started by moonman239, Jan 26, 2015.

  1. moonman239 macrumors 68000

    Mar 27, 2009
    I'm looking to create a wrapper for Mac OS X's Location Services in pure C++. If I can do that, then I can create a Python module or a Ruby gem for accessing location services.

    I have not found any information on this.
  2. moonman239 thread starter macrumors 68000

    Mar 27, 2009
  3. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    Look at RubyCocoa. You should be able to skip a few steps and use LocationServices more directly from ruby.

  4. kamy macrumors member

    Jul 27, 2011
    In one of our projects We have used 'C' functions to talk to 'Objective C' functions to do the Mac UI stuff.
    From C++ layer we just invoke the C functions.
  5. moonman239 thread starter macrumors 68000

    Mar 27, 2009
    Does anyone know if I can rely on .mm files to create relays between Objective-C and C++?
  6. chown33 macrumors 604

    Aug 9, 2009
    A .mm file is Objective-C++. You should look it up if you're not sure what that means. For example:

    There are more extensive references on Apple's developer website, but you might need to search outside of Apple to find older references.

    I don't understand what you mean by "relays", at least in the context of Objective-C++.

Share This Page