• 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: xcode 2.2 compiles .m file as C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xcode 2.2 compiles .m file as C++


  • Subject: Re: xcode 2.2 compiles .m file as C++
  • From: Kent Sorensen <email@hidden>
  • Date: Wed, 11 Jan 2006 15:02:34 -0500

Thanks for the reply. There is no text in the "other C Flags" field in the project settings. Get Info on the .m file says "sourcecode.c.objc" (I mentioned that already)

I searched the archives for this one and you said at one point that this could happen if the precompiled header included cocoa headers. It does not. Also, the .m file #imports only <Carbon/Carbon.h> and <Cocoa/Cocoa.h>

I can comment out everything in the file except the Cocoa import and still get the same result.

Honestly, the ability to build for intel is not enough compensation for having to deal with this mess on a daily basis. I hit these mysterious configuration problems way too often. Once I get this working the only reason for firing up xcode will be to build the intel version once all the other development work has been done in CodeWarrior.

kent

On Jan 11, 2006, at 2:32 PM, Chris Espinosa wrote:

On Jan 11, 2006, at 11:23 AM, Kent Sorensen wrote:

I have a carbon xcode project, using GCC 4 to which I've added a .m file. During compile this file causes around 9857 errors (!!). The cause is that the "-x c++" is passed to the compiler so all the obj-c header files cause syntax errors..

In the target settings I have "compile sources as: according to file type", and if I select the .m and do a Get Info in xcode, it says that the file type is "sourcecode.c.objc" so I don't understand why it passes the -x c++ flag.

I've uploaded an abbreviated build log to http://paste.lisp.org/display/15630.

I might add that the .m file comes unmodified from another xcode project that builds fine and I have a perfectly working codewarrior project that includes this .m file.

Check to see that "Other C Flags" doesn't have "-x c++" hardcoded into it.


Get Info on you r.m file and ensure that its file type is "sourcecode.c.objc"

Chris _______________________________________________
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

_______________________________________________ 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: xcode 2.2 compiles .m file as C++
      • From: Chris Hanson <email@hidden>
    • Re: xcode 2.2 compiles .m file as C++
      • From: Markus Hitter <email@hidden>
References: 
 >xcode 2.2 compiles .m file as C++ (From: Kent Sorensen <email@hidden>)
 >Re: xcode 2.2 compiles .m file as C++ (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Linking behavior for dylibs without the lib prefix
  • Next by Date: Re: Xcode 2.2 Hangs on Launch (Still, after reinstall)
  • Previous by thread: Re: xcode 2.2 compiles .m file as C++
  • Next by thread: Re: xcode 2.2 compiles .m file as C++
  • Index(es):
    • Date
    • Thread