Re: linker error nonsense?
Re: linker error nonsense?
- Subject: Re: linker error nonsense?
- From: "Clark S. Cox III" <email@hidden>
- Date: Tue, 27 Oct 2015 18:23:47 -0700
> On 2015/10/27, at 18:17, Patrick J. Collins <email@hidden> 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”
That is because initializing static variables like that is only valid in C++, not in C.
> Also it's complianing about functions that return structs saying "expected expression"...
It seems you were relying on C++ features without realizing it.
--
Clark Smith Cox III
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