Linker command error: 'ld: symbol(s) not found for architecture i386'

Siddharthan Asokan picture Siddharthan Asokan · Jul 19, 2012 · Viewed 97.1k times · Source

I have an error at compile time. Seems to be weird. it worked as detail view application, but using single view doesn't seem to work. this is the error details:

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

Answer

iOS Test picture iOS Test · Jul 19, 2012

Try these steps:

  1. Open your project in XCode.

  2. In left side window/panel of XCode click on your project name on top.

  3. Now select Target from right side panel of XCode.

  4. Select Build Phases from right panel's top. (here other option will be Build Settings, Build Rules)

  5. In the same panel open the "Compile sources", here check: are all the files (.m) listed? if not all files click on (+) sign in bottom to add (.m) files which is not in list

  6. As per your error it seems RssXmlParser not there, add this and compile again

It will work fine now.