Note that there are some explanatory texts on larger screens.

plurals
  1. POCommand /Developer/usr/bin/clang failed with exit code 1
    primarykey
    data
    text
    <p>I was trying to make a simple Mac Objective-C application with Xcode to keep score of two players playing a simple game with up to 36 scores per player. It isn't a very practical application because of its limited features, and it's mostly for practice. I was trying to expand the application a bit with a Preferences window, which would pop up when a menu item was clicked.</p> <p>I created a file to control the men item, then a nib to pop up when it's clicked. All of this worked fine, and a new window would pop up. I put sliders, text fields, etc. on the nib, and connected them to actions. All of that worked fine.</p> <p>The problem came when I tried to import the files into my root controller so that I could use the user's choices in the application.</p> <p>I got the following compiler error:</p> <pre><code>Command /Developer/usr/bin/clang failed with exit code 1 </code></pre> <p>Along with all of this:</p> <blockquote> <p>Ld "/Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Products/Debug/SimpleScoreKeeper Mac.app/Contents/MacOS/SimpleScoreKeeper Mac" normal x86_64 cd "/Users/myusername/Dropbox/iphone app/SimpleScoreKeeper Mac" setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/clang -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Products/Debug -F/Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Products/Debug -filelist "/Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Intermediates/SimpleScoreKeeper Mac.build/Debug/SimpleScoreKeeper Mac.build/Objects-normal/x86_64/SimpleScoreKeeper Mac.LinkFileList" -mmacosx-version-min=10.6 -framework Cocoa -o "/Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Products/Debug/SimpleScoreKeeper Mac.app/Contents/MacOS/SimpleScoreKeeper Mac"</p> <p>ld: duplicate symbol _addScores in /Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Intermediates/SimpleScoreKeeper Mac.build/Debug/SimpleScoreKeeper Mac.build/Objects-normal/x86_64/Prefrences.o and /Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Intermediates/SimpleScoreKeeper Mac.build/Debug/SimpleScoreKeeper Mac.build/Objects-normal/x86_64/RootController.o for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Command /Developer/usr/bin/clang failed with exit code 1</p> </blockquote> <p>The (possibly) related files in my project follow.</p> <pre><code>RootController.h - All the interface declarations for stuff in the MainMenu.xib window RootController.m - Where I need to import the files to MainMenu.xib - The nib owned by the RootController class Preferences.h - A file I'd want to import, but it won't work. Preferences.m - A file I'd (maybe) want to import, but it won't work. Preferences.xib - The nib owned by the Preferences class. PreferencesMenuController.h - Where I declare the clickPreferences action. (Liked to MainMenu.xib) PreferencesMenuController.m - Where I say that clickPreferences opens up Preferences nib. (Linked to MainMenu.xib) </code></pre> <p>Is there a reason why I'd be getting this error? Is there something I need to do in the class I'm importing? Please be pretty detailed, I'm new to the language somight not know how to do certain things. And if there's anything I need to clarify, let me know.</p> <p>EDIT: Here's the code to the file I can't import.</p> <pre><code>#import "Preferences.h" @implementation Preferences int addScores; - (IBAction)addScoresToggled { NSLog(@"addScores was toggled."); } - (id)initWithWindow:(NSWindow *)window { self = [super initWithWindow:window]; if (self) { } return self; } - (void)dealloc { [super dealloc]; } - (void)windowDidLoad { [super windowDidLoad]; } @end </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload