Re: linker error nonsense?
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