Reputation: 674
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 :
But none of these changes work. Please, does someone have a clue on this? Thanks
Upvotes: 42
Views: 110411
Reputation: 9579
I just had this error when I opened a (quite) old project, created in Xcode 4~ish, in Xcode 6.4. While the linked Frameworks were visible in the Project sidebar, I overlooked that there were no linked libraries in the Target Build Phases tab. Once I fixed that, it compiled fine.
Upvotes: 4
Reputation: 122
I just had the exact same error, and solved it by restarting xcode.
For me the issue occurred after an svn update, the file in question was added to the projects folder, but it never appeared in xcode(9.3.1) – until I restarted it.
Upvotes: 1
Reputation: 835
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.
Upvotes: 46
Reputation: 69
I solved the problem by deleting reference to the file and adding it again in project. In my case it works.
Upvotes: 0
Reputation: 1760
I simply wasn't linking the libraries in the "Link Binary with Libraries" section.
Upvotes: 2
Reputation: 697
this setting worked for me:
Upvotes: -2
Reputation: 6905
Same error when I copied/pasted a class and forgot to rename it in .m file.
Upvotes: 0
Reputation: 677
Check if that file is included in Build Phases -> Compiled Sources
Upvotes: 44
Reputation: 266
Make sure the WOExerciseListViewController is a Target Member; that worked for me!
Upvotes: 20
Reputation: 264
Yes, I think the library you are using is not compatible with 64 bit version but you can solve the problem -
Just navigate to Build Settings>Architectures & replace $(ARCHS_STANDARD)
to $(ARCHS_STANDARD_32_BIT)
So that your xcode build your project with 32 bit supported version.
Upvotes: 4
Reputation: 611
I solved the same issue by going to Xcode Build Settings and in Architectures, I changed the Xcode 6.1.1 standard architecture to:-
$(ARCHS_STANDARD_32_BIT)
Upvotes: 1