Re: linker error nonsense?
> 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 http://collinatorstudios.com ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
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 > exposed in utils.h... > > RangeEditor, was located at > $(project)/Menus/MenuItems/Widgets/RangeEditor/ > > ... > > I decided that I wanted that file at the root level.. so I moved > RangeEditor.m and RangeEditor.h to $(project)/ > > ... now when I build, I get: > > Undefined symbols for architecture arm64: > "_clamp", referenced from: > -[RangeEditor draggableNoteDidMove:touch:] in RangeEditor.o >(maybe you meant: _clampf) > ld: symbol(s) not found for architecture arm64 > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > > If I move the files back, I still get that error. But if I revert the > changes > in git (literally only moving those files around) then everything builds > perfectly fine. > > What in the world??? There are no xcodeproj changes concurrent with those moves? --Kyle Sluder ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Xcode 7 command line tools
I'm currently downloading Xcode 7.1 directly from https://developer.apple.com/downloads (all 4.2GB!). Does this come bundled with (and install) the command line tools also, or must those be downloaded separately? -Carl ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
> 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 utils.m is c++? Patrick J. Collins http://collinatorstudios.com On Tue, 27 Oct 2015, Jens Alfke wrote: ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
> 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 (Cmd-Opt-zero) In the Type pop-up at the top, change the value back to “Default - Objective-C Source”. —Jens ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My app won't work on Mini
On Oct 27, 2015, at 1:13 PM, Gil Dawsonwrote: > I'm not real familiar with XCode, but I managed to make a little app using > XCode 3.2.5 with the AppleScriptObjC.framework that works fine. > > I've been using it successfully for months on my MacBook Pro. Now I want to > use the same app on my Mini, but double-clicking on it in the Finder gets an > alert box: > > You can't open the application TimeCode Editor.app because it isn't supported > on this type of Mac. > > Both my MacBookPro5,5 and my Macmini1,1 are running 10.6.8. The CPU in the MacBookPro5,5 supports 64-bit execution ("x86_64"), but the Macmini1,1 is 32-bit-mode ("i386") only. You should be able to compile a "fat" version of the app that runs on both machines by adding "i386" to the list of architectures in Xcode's build settings (sorry, I can't remember exactly where it is in Xcode 3). You can also just compile it for 32-bit targets only and it should still run fine on both machines IIRC. ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
My app won't work on Mini
Hi-- I'm not real familiar with XCode, but I managed to make a little app using XCode 3.2.5 with the AppleScriptObjC.framework that works fine. I've been using it successfully for months on my MacBook Pro. Now I want to use the same app on my Mini, but double-clicking on it in the Finder gets an alert box: You can't open the application TimeCode Editor.app because it isn't supported on this type of Mac. Both my MacBookPro5,5 and my Macmini1,1 are running 10.6.8. Is there some Preference I could set to have XCode compile the app so that it will run on both machines? --Gil ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
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 = ""; }; + CDBE2D1A1BDFEA7A000BE921 /* RangeEditor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RangeEditor.m; path = Menus/MenuItems/Widgets/RangeEditor/RangeEditor.m; sourceTree = ""; }; So now when RangeEditor.m calls ‘clamp’ it doesn’t mangle the name, i.e. it creates an external reference to a symbol called ‘_clamp’. But utils.m is an Objective-C++ file so it implements ‘clamp’ with a C++-mangled name. Thus the link error. IMHO it’s better to make the language explicit in the filename by using “.mm” for Objective-C++ source files. It prevents this kind of confusion. —Jens ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Xcode 7 command line tools
> On Oct 27, 2015, at 1:58 PM, Erik Colsonwrote: > > Carl Hoefs writes: > >> I'm currently downloading Xcode 7.1 directly from >> https://developer.apple.com/downloads (all 4.2GB!). Does this come bundled >> with (and install) the command line tools also, or must those be >> downloaded separately? > > You need to install them separately with > > xcode-select —install No, they’re inside Xcode in Contents/Developer, and Xcode registers them the first time you launch the new version. I don’t recall ever running that command; IIRC it’s for people who want to install just the command-line tools without Xcode. —Jens ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: My app won't work on Mini
On Tue, Oct 27, 2015, at 03:25 PM, Gil Dawson wrote: > On Oct 27, 2015, at 1:23 PM, Wim Lewis wrote: > > > You should be able to compile a "fat" version of the app that runs on both > > machines by adding "i386" to the list of architectures in Xcode's build > > settings > > That was it! > > I changed Project -> Set Active Architecture from "x86_64" to "i386" > (only one is selectable at a time), then clicked "Build and Debug". Now > the resultant app works on both machines! > > (The same choices are available on the big pulldown in the ULCorner of > the main window.) You've gone about this from the wrong end :) The "Active Architecture" build setting is automatically controlled by the scheme selector in the toolbar. When you have "My Mac" selected, the Active Architecture setting reflects what architecture that Mac has. By default, the Active Architecture setting only matters when building a Debug build. By default, Debug and Release are the two variants defined in a freshly-created target. Each action you can perform on a scheme (Run, Test, Profile, Archive) will build its targets using a particular variant (configurable in the scheme editor). By default, the Run action is set up to use the Debug variant, while the others are all set up to use the Release variant. Long story short: only use Build for Running (the Cmd-B shortcut) when building and running code on your machine. When you actually want to "release" your product, even if you're only releasing it to yourself, use Archive. That'll build a Release version of your app that is built for all valid architectures on the platform (in your case, i386 and x86_64). --Kyle Sluder ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
> 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 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 = ""; }; > > 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 clarkc...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
> 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 = ""; }; 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"... Patrick J. Collins http://collinatorstudios.com ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
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 convert all my .m's to .mm? Patrick J. Collins http://collinatorstudios.com On Wed, 28 Oct 2015, Roland King wrote: > > > On 28 Oct 2015, at 09:39, Patrick J. Collins > >wrote: > > > >> That is because initializing static variables like that is only valid in > >> C++, not in C. > > > > I did not realize that... What is the "proper" way to define constants > > with NSStrings and NSNumbers as values in a non-c++ scenario? > > > Strings : > > NSString * MyConstantString = @“My Constant String Contents”; > > Numbers: > > you can't ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
> 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 moved, so it’s Obj-C++ again. That oughta do it. —Jens ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: linker error nonsense?
> On Oct 27, 2015, at 6:43 PM, Roland Kingwrote: > > Numbers: > > you can't Well, realistically you use the +initialize method; something like: @implementation … static Foo* MyConstantFoo; + (void) initialize { if (!MyConstantFoo) MyConstantFoo = ….. ; } —Jens ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: XCode Update Taking Forever
On 26 oct. 2015, at 11:23, Dave wrote: > Hi All, > > I got a prompt to update to the latest version of XCode which I did via the > App Store. The download took a really long time, but eventually it said it > was “Installing - 3 Minutes” it’s now been flickering between “Less than a > minutes, about a minute, 1 Minute, 2 minutes and 3 minutes” for over half an > hour now (after a 20+ minute download). Is there anyway to tell if the “App > Store” App is actually doing anything? I can’t believe it takes this long to > update XCode, a complete download and re-install would have been quicker. It's known to be faster and more reliable to download Xcode via the Developer website. That assumes that you can find the download link. Which has become a bit easier recently (after it became very difficult in June). > Why, Oh Why is the App Store App so Naff? Because it's the App Store.app. ___ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com