Aaron Hayman
Aaron Hayman

Reputation: 8502

3245 duplicate symbols for architecture armv7

I'm getting a very long Linker Error when I try to compile my code, with 3245 duplicate symbol errors. The errors always include main.o as the first item, and then one of my other classes as the other item. Obviously, posting the entire error would be pointless (and probably not possible). It actually takes Xcode a few seconds just to render the text of the error... which I find amusing for some reason. But the gist is this:

duplicate symbol _OBJC_IVAR_$_ViewType._device in:
    /Users/aaron/Library/Developer/Xcode/DerivedData/Flexile-czlbybfalwraxaawasjobleidvys/Build/Intermediates/Flexile.build/Debug-iphoneos/Flexile.build/Objects-normal/armv7/main.o
    /Users/aaron/Library/Developer/Xcode/DerivedData/Flexile-czlbybfalwraxaawasjobleidvys/Build/Intermediates/Flexile.build/Debug-iphoneos/Flexile.build/Objects-normal/armv7/ModelViewController.o

Like I said, the first class listed in each error is always main.o. I've tried:

  1. I've searched through my project and I can't find a single place where I included/imported main.m.
  2. I've checked my Compile Sources and nothing is duplicated as far as I can tell. I've got 266 source files, so it's hard to be absolutely sure, but certainly main.m is only included once.
  3. I've checked Other Linker Flags in Build Settings and it's empty.
  4. I've cleaned the project and I've deleted all derived data, just in case.

Upvotes: 0

Views: 361

Answers (1)

Aaron Hayman
Aaron Hayman

Reputation: 8502

Found it: I had imported a ".m" file in one of my classes on accident. Took me a while to find it but that fixed the problem. Thanks for the suggestions!

Upvotes: 1

Related Questions