• 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
Can't include objective c file in carbon project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't include objective c file in carbon project


  • Subject: Can't include objective c file in carbon project
  • From: Kurt Spaker <email@hidden>
  • Date: Tue, 28 Oct 2008 12:49:46 -0400
  • Organization: Asar Corporation

Hello,

I'm trying to use NSCursor in a carbon project, based on the
CarbonCocoa_PictureCursor sample code. I can open and build the sample
project w/o any problems.

I added the Cocoa framework, NSCursorWrappers.m and .h to my project,
confirmed that all build settings were identical to the
CarbonCocoa_PictureCursor sample project, including the setting to compile
sources according to File Type, and changed my prefix file as follows:

#include <Carbon/Carbon.h>

#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#else
All other contents of my prefix file, including C++ headers that I don't want
included for ObjC files
#endif

Yet NSCursorWrappers.m is being compiled as C++ and generating 1000s of
errors. From the preprocessor:

NSCursorWrappers.o ../NSCursorWrappers.m normal i386 c++
com.apple.compilers.gcc.4_0

Any idea why XCode is compiling this as c++?

Kurt

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can't include objective c file in carbon project
      • From: "Shawn Erickson" <email@hidden>
    • Re: Can't include objective c file in carbon project
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Xcode projects to make files?
  • Next by Date: re: Automatically Remove Unused #import Directives
  • Previous by thread: Re: Automatically Remove Unused #import Directives
  • Next by thread: Re: Can't include objective c file in carbon project
  • Index(es):
    • Date
    • Thread