Re: linker error nonsense?

2015-10-27 Thread Patrick J. Collins
> Have you tried cleaning the build folder (Cmd-Shift-Opt-K) after moving the > files? That often clears up inexplicable build errors. Yeah, I tried that and even deleted DerivedData in ~/Library/Developer/Xcode. Any other ideas on how I can get my app building again? Patrick J. Collins

Re: linker error nonsense?

2015-10-27 Thread Kyle Sluder
On Mon, Oct 26, 2015, at 07:20 PM, Patrick J. Collins wrote: > Hi everyone, > > I have a really weird linker error that I am completely baffled by... > > Basically, I have a file: RangeEditor.m, which uses a c function > called clamp(). clamp is defined in a utils.m file which has a header >

Re: linker error nonsense?

2015-10-27 Thread Patrick J. Collins
> You inadvertently changed RangeEditor.m from Objective-C++ to Objective-C > when you removed and re-added it: Oh interesting. This file actually isn't c++, neither is utils.m When I look at my build phases, neither of those have any compiler flags. How can I tell it to stop thinking

Re: linker error nonsense?

2015-10-27 Thread Jens Alfke
> On Oct 27, 2015, at 12:01 PM, Patrick J. Collins > wrote: > > When I look at my build phases, neither of those have any compiler flags. > How can I tell it to stop thinking utils.m is c++? Select the .m file(s) in the file navigator Show the file inspector

Re: linker error nonsense?

2015-10-27 Thread Jens Alfke
You inadvertently changed RangeEditor.m from Objective-C++ to Objective-C when you removed and re-added it: - CDE3EE891804C87A00201967 /* RangeEditor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RangeEditor.m; sourceTree =

Re: linker error nonsense?

2015-10-27 Thread Clark S. Cox III
> On 2015/10/27, at 18:17, 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

Re: linker error nonsense?

2015-10-27 Thread Patrick J. Collins
> 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

Re: linker error nonsense?

2015-10-27 Thread Patrick J. Collins
So what is my best course of action here? I've got a 3 year old code-base (rather large), and I really don't want to be going through file after file, fixing every little thing XCode it complains about even though for the past 3 years it never complained about any of this stuff... Should I just

Re: linker error nonsense?

2015-10-27 Thread Jens Alfke
> On Oct 27, 2015, at 7:19 PM, Patrick J. Collins > wrote: > > Should I just convert all my .m's to .mm? I’d just back out the surgery you did on the pbxproj, which should fix every source file but one; and then change the Type pop-up for that one file that you

Re: linker error nonsense?

2015-10-27 Thread Jens Alfke
> On Oct 27, 2015, at 6:43 PM, Roland King wrote: > > Numbers: > > you can't Well, realistically you use the +initialize method; something like: @implementation … static Foo* MyConstantFoo; + (void) initialize { if (!MyConstantFoo)

linker error nonsense?

2015-10-26 Thread Patrick J. Collins
Hi everyone, I have a really weird linker error that I am completely baffled by... Basically, I have a file: RangeEditor.m, which uses a c function called clamp(). clamp is defined in a utils.m file which has a header exposed in utils.h... RangeEditor, was located at