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 7566633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:27:52+00:00 2026-05-30T14:27:52+00:00

I am learning objective-c and XCode using Stephen Kochan’s book. For one of the

  • 0

I am learning objective-c and XCode using Stephen Kochan’s book. For one of the assignments, I needed to implement an AddressBook lookup feature from the command line. I used two classes from a previous project, added the files and did not make a copy. All builds fine in XCode, but when I issue the following command at the command line:


clang -fobjc-arc -framework Foundation main.m -o ch19

I get the error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_AddresBook", referenced from:
      objc-class-ref in cc-bx2cgt.o
  "_OBJC_CLASS_$_AddressCard", referenced from:
      objc-class-ref in cc-bx2cgt.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

No typo in AddresBook, my class name has one “s”. I tried removing the files (AddresBook.h and .m and AddressCard.h and .m) from my project, adding them with and without copying. Building and running the app in XCode works just fine.

How can I “clear” out the references and add them again so that I can compile it from the command line?

Thank you.

  • 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-30T14:27:53+00:00Added an answer on May 30, 2026 at 2:27 pm

    You need to add those other files object codes.

    clang -fobjc-arc -framework Foundation main.m AddressBook.m -o ch19 or compile them to object files and then link them.

    You should also be using xcodebuild for this, if you want to do it on the command line.

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

Sidebar

Related Questions

I am learning Objective-C using Stephen Kochan's excellent book Programming in Objective-C 2.0. I
I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy
I've been learning Objective-C and Cocoa by working my way through the Hillegass book
I'm learning objective-c, working through Aaron Hillegass' book Cocoa Programming for Mac OS X
I've been learning Objective-C and just recently started using classes (instead of having everything
I've been learning Objective C lately, and I came across some code for using
I want to start learning objective-c with book: Programming in Objective-C (4th Edition) .
Im very new to Objective-C and am currently learning how to use Xcode and
I'm somewhat familiar with Cocoa, Objective-C and iPhone Development using Xcode. I'm starting to
Im learning objective C (using a mac in my work) In my house I

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.