• 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
Re: Adding obj-c++ file to carbon project changes preprocessed header file types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding obj-c++ file to carbon project changes preprocessed header file types


  • Subject: Re: Adding obj-c++ file to carbon project changes preprocessed header file types
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 13 Feb 2008 08:59:56 -0800


On 13 Feb '08, at 8:24 AM, Russ wrote:

That only works for the top level. When you have a #include "foo.h" the include
path determines what file it resolves to. If the same file name is used in
cocoa and c++ --- but must resolve to different paths --- there is a problem.

True. But I'm surprised you'd run into that, since if you only have a tiny amount of custom Obj-C code, it should only be using unambiguous system headers like <AppKit/NSCursor.h>...


I'd like to be able to set up a set of include paths that is used from obj-c
sources and a different set of paths for the c++ sources. It's fine for the
compiler, no problem there, but XCode doesn't seem to give you a way to set it
up.

You can edit the "Other C++ Flags" target setting, and add raw gcc command arguments to add include paths. Those will only be used when compiling C++.
But it might be cleaner just to have a separate static-library target for the Obj-C code, as you're doing.


—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Adding obj-c++ file to carbon project changes preprocessed header file types (From: Russ <email@hidden>)

  • Prev by Date: Re: In-loop releasing of objects does not free memory?
  • Next by Date: Re: In-loop releasing of objects does not free memory?
  • Previous by thread: Re: Adding obj-c++ file to carbon project changes preprocessed header file types
  • Next by thread: NSAttributeString change the paragraph style
  • Index(es):
    • Date
    • Thread