• 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: linker error nonsense?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linker error nonsense?


  • Subject: Re: linker error nonsense?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 27 Oct 2015 19:27:02 -0600


On Tue, Oct 27, 2015, at 07:17 PM, Patrick J. Collins wrote:
> > Select the .m file(s) in the file navigator
> > Show the file inspector (Cmd-Opt-zero)
> > In the Type pop-up at the top, change the value back to “Default - Objective-C Source”.
>
> So as I inspect all these files in my project, they all say they are
> "Default - Objective-C Source".
>
> However, I went into my .pbxproj file and saw a number of entries such
> as:
>   386F536B1B603D0E00B315C2 /* Pager.m */ = {isa = PBXFileReference;
>   fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path =
>   Pager.m; sourceTree = "<group>"; };
>
> So I did a global search/replace and turned that to sourcecode.c.objc
>
> And now I have a gazillion of other errors when I build, things like:
>
>   static NSNumber * const InitialDelay = [NSNumber
>   numberWithFloat:0.25f];
>
>   @interface Pager ()
>   ...
>
> Where it complains "Initializer element is not a compile-time constant"
>
> Also it's complianing about functions that return structs saying
> "expected expression"...

Well, yes, I would expect those errors, since both of these are C++isms.

I'm no expert on Xcode's inner workings, but "lastKnownFileType" sure
sounds like a cache and not an authoritative declaration. Did you check
the Build Rules tab of your project editor to see if someone defined a
custom rule to treat .m files as Objective-C++?

--Kyle Sluder

 _______________________________________________
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


References: 
 >linker error nonsense? (From: "Patrick J. Collins" <email@hidden>)
 >Re: linker error nonsense? (From: Kyle Sluder <email@hidden>)
 >Re: linker error nonsense? (From: "Patrick J. Collins" <email@hidden>)
 >Re: linker error nonsense? (From: Jens Alfke <email@hidden>)
 >Re: linker error nonsense? (From: "Patrick J. Collins" <email@hidden>)
 >Re: linker error nonsense? (From: Jens Alfke <email@hidden>)
 >Re: linker error nonsense? (From: "Patrick J. Collins" <email@hidden>)

  • Prev by Date: Re: linker error nonsense?
  • Next by Date: Re: linker error nonsense?
  • Previous by thread: Re: linker error nonsense?
  • Next by thread: STK with cocoapods and Mach-O linker error "Undefined symbols for architecture armv7"
  • Index(es):
    • Date
    • Thread