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

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.
Similar Threads
  1. Florian Zschocke

    NSWindowController - new instance ?

    Florian Zschocke, Apr 16, 2004, in forum: Programmer Help
    Replies:
    3
    Views:
    259
    Florian Zschocke
    Apr 20, 2004
  2. kelvSYC
    Replies:
    5
    Views:
    304
  3. kelvSYC
    Replies:
    0
    Views:
    435
    kelvSYC
    Jun 5, 2005
  4. kelvSYC
    Replies:
    0
    Views:
    385
    kelvSYC
    Aug 25, 2005
  5. eugen

    NSApplication instance

    eugen, Apr 2, 2006, in forum: Programmer Help
    Replies:
    2
    Views:
    226
    eugen
    Apr 2, 2006
  6. Jason8

    Objective-C++ Instance Variables

    Jason8, Jul 3, 2008, in forum: Programmer Help
    Replies:
    7
    Views:
    255
    David Phillip Oster
    Jul 5, 2008
  7. kalpesh

    Single instance of application for each session

    kalpesh, Sep 2, 2009, in forum: Programmer Help
    Replies:
    1
    Views:
    334
    Simon Slavin
    Sep 2, 2009
  8. D.M. Procida
    Replies:
    6
    Views:
    234
    Rolly
    Nov 27, 2007
Loading...