• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
C++ structs in .mm file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ structs in .mm file


  • Subject: C++ structs in .mm file
  • From: "GM Lopes" <email@hidden>
  • Date: Wed, 26 May 2004 14:59:52 +0000

Hi all,

I'm trying to use existing C++ classes and structs in Objective-C classes. But when I insert C++ header file, I get more than hundred compilation errors. Objective-C file has extension .mm, but that doesn't help. When I use the same C++ header file in a .cpp file, it compiles ok (in the same project). Can't figure out, what's the problem :(

I have browsed through mailing list archives and tried different tricks, but to no avail. Wrapping C++ struct definitions into extern "C++" didn't help either...

Does anybody have some hints, what to do? Maybe I'm just missing some compilator flag or smth?

Some of these compilation errors:
MyHeader.h:111: error: missing ';' before right brace
MyHeader.h:111: error: parse error before `BOOL'
MyHeader.h:112: error: parse error before `,' token
MyHeader.h:112: error: `PRIVILEGE' was not declared in this scope
MyHeader.h:122: error: non-member function `bool GetUser(...)' cannot have `const' method qualifier

Thanks in advance!

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: C++ structs in .mm file
      • From: Phillip Mills <email@hidden>
  • Prev by Date: Re: simple telnet-like networking in cocoa
  • Next by Date: Re: [ANN] Searchable Cocoa-Dev Web Archive (again)
  • Previous by thread: Re: NSComboBox and bindings
  • Next by thread: Re: C++ structs in .mm file
  • Index(es):
    • Date
    • Thread