Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6974611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:15:37+00:00 2026-05-27T17:15:37+00:00

I was trying to make a simple Mac Objective-C application with Xcode to keep

  • 0

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.

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.

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.

I got the following compiler error:

Command /Developer/usr/bin/clang failed with exit code 1

Along with all of this:

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”

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

The (possibly) related files in my project follow.

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)

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.

EDIT:
Here’s the code to the file I can’t import.

#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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:15:38+00:00Added an answer on May 27, 2026 at 5:15 pm

    You can also get this error of you accidentally include the implementation file rather than the header file. e.g. #import “MyClass.m” instead of #import “MyClass.h”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a simple app that sits on the Mac OSX menu
I am just trying a simple application, to make the browser fullscreen. this is
I'm trying to make simple paint application, based on Apple's GLPaint. To draw a
I am trying to make simple google map Application in android. my Apps. is
Trying to make a simple application in rails 3. If I create a team
I am trying to make a simple example of Hibernate. I have two entities:
I am trying to make a simple collision detection class for a soccer game.
I'm trying to make a simple blackjack program. Sadly, I'm having problems right off
I'm trying to make a simple C# web server that, at this stage, you
I'm trying to make some simple XML with Java and org.w3c.dom, but I got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.