clang: error: linker command failed with exit code 1 (use -v to see invocation) in xcode 6

3.6k views Asked by At

Hello I am currently working on an IOS app in xcode 6. I am getting the following error when archiving the application. It runs successfully when built on the emulator. After further inspection I've found this specific error message while compiling each piece of code step-by-step in the terminal.

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

There are 2 answers

0
AudioBubble On

I believe you should go to your project settings, then your target and ensure you set the Architectures and Valid Architectures to what you see in the below image, the first one is selectable through Xcode while you should ensure you set the second one manually.

enter image description here

0
Surezz On

I faced the same problem while runnning the project.

  1. Go to Build settings -- > Build architecture only to set

Debug - YES

Release - NO

  1. Add --> Other linker flag: - objc, -lc++, $(inherited)

clean and run the project. It was fixed for me !