Objective-C++ Instance Variables

Discussion in 'Programmer Misc' started by Jason8, Jul 3, 2008.

  1. Jason8

    Jason8 Guest

    hi:

    I'm trying to bridge between my Cocoa App and my C++ framework via
    Objective-C++. Apparently I can't have C++ objects as instance
    variables in my ObjC class because they contain virtual methods. Also,
    I don't appear to be able to include my C++ header files in by ObjC
    header file; they work fine if I include them in my implementation
    file (.mm).

    How should I create my C++ objects and use them within my ObjC class
    (over it's lifetime)?

    Perhaps I should be doing this a different way? What I have is a C++
    framework compiled into a dylib. I include the headers in my .mm and
    link in the dylib.
     
    Jason8, Jul 3, 2008
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.