Undefined symbols for architecture x86_64 on Xcode 6.1

batistomorrow picture batistomorrow · Oct 25, 2014 · Viewed 103k times · Source

All of a sudden Xcode threw me this error at compilation time:

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

After doing some research, I may understand that a library I'm using is not compatible with 64 bit version. But this is very strange since I've been working with the same libraries for at least a week without having a single compilation problem during that time. The two libraries are just composed of a bunch of classes, and when I removed them from my project I got the same issue. Since I have never created libraries myself, I have no idea how I can find wether the ones I'm using are compatible with 64 bit (?) I also tried the following changes for architectures under the target panel :

  • added $(ARCHS_STANDARD_INCLUDING_64_BIT) to the Architectures
  • build active architecture only -> set to 'NO'
  • for 'valid architectures' -> set to arm64, armv7 and armv7s
  • deleted the DerivedData folder and its contents, cleaned and built again

But none of these changes work. Please, does someone have a clue on this? Thanks

Answer

Banane picture Banane · Oct 25, 2014

Apparently, your class "Format" is involved in the problem. Check your declaration of this class, especially if you did it inside another class you probably forgot the @implementation or something similar.