XCode Error ".objc_class_name_", referenced from:

Discussion in 'Mac Programming' started by Hot Sauce79, Jul 10, 2008.

  1. macrumors newbie

    Joined:
    Jul 1, 2008
    #1
    Here is the error that is given.


    Here is the code (MoveMe2View.m) that contains the error.

    Here is the PlacardView.h



    Any and all help will be greatly appreciated. Thank you.
     
  2. macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    Where's the implementation of PlacardView? You included the header file, but not the source that contains the actual definitions.

    -Lee
     
  3. thread starter macrumors newbie

    Joined:
    Jul 1, 2008
    #3
    here is the implementation and the whole PlacardView.m

    Also here is the MoveMe2View.h code

     
  4. thread starter macrumors newbie

    Joined:
    Jul 1, 2008
    #4
    Still havent gotten it yet. Any help or words of advice are good.
     
  5. thread starter macrumors newbie

    Joined:
    Jul 1, 2008
    #5
    I figured out what was wrong. When i added the file I had forgotten to click on the check box for the compiler to know its ready to be compiled. I also had to run the Clean function under the Build section in the menu. Everything works now.
     
  6. macrumors newbie

    Joined:
    Sep 16, 2003
    #6
    that error just means that the compiler can't find that class or object. You probably need to add a framework...
     
  7. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #7
    That has happened to me a lot of times. That error is caused when the compiler can't find a class or function. Besides the obvious reasons for that to happen, you should also do something like this:

    On the left of the Xcode window go to the targets, and find your application. Open it. You should see a build phase named "Compile Sources". Make sure that your implementation file is included inside that build phase. If not, drag and drop it onto that build phase.

    Also, make sure that you have all frameworks included and linked to your application! To make that sure, go into your application target again, and see the "Link Binary With Libraries" build phase. See if all necessary .framework files are in there. If not, add them using drag and drop.

    I hope this solves your problem.
     
  8. macrumors newbie

    Joined:
    Aug 2, 2010
    Location:
    San Jose, CA USA
    #8
    A belated thanks to Soulstorm for fixing similar bug to that posted :)
     

Share This Page