0

I'm getting following error after including an external framework and building the project with it. Don't know what to do. Only headers file of the external framework are available to me. All the implementation files (.m) are in a .exe file so I can't access them.

duplicate symbol _OBJC_CLASS_$_AppDelegate in:
    /Users/u311107/Library/Developer/Xcode/DerivedData/ConsumerApp-awxafvfmhvwglmdvoobikahakarp/Build/Intermediates/ConsumerApp.build/Debug-iphoneos/ConsumerApp.build/Objects-normal/armv7/AppDelegate.o
    /Users/u311107/Desktop/Stash/Mall/consumer/KMCSDK.framework/KMCSDK(AppDelegate.o)

duplicate symbol _OBJC_METACLASS_$_AppDelegate in:
    /Users/u311107/Library/Developer/Xcode/DerivedData/ConsumerApp-awxafvfmhvwglmdvoobikahakarp/Build/Intermediates/ConsumerApp.build/Debug-iphoneos/ConsumerApp.build/Objects-normal/armv7/AppDelegate.o
    /Users/u311107/Desktop/Stash/Mall/consumer/KMCSDK.framework/KMCSDK(AppDelegate.o)

ld: 2 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Please help. Thanks.

Animesh Porwal
  • 557
  • 1
  • 10
  • 21
  • http://stackoverflow.com/a/18628761/1104126 - This answer helped me – mattblessed Nov 27 '13 at 22:07
  • @Skullz i tried you suggestion but then it gives me a new error as `No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=arm64 armv7).` – Animesh Porwal Nov 27 '13 at 22:48
  • [project name]->[target name]->Build Settings->Search "Architectures"->Under the 'Architectures' key click the drop down and select Standard Architectures – mattblessed Nov 27 '13 at 23:10
  • I selected both the option in the drop down menu but still it says the same problem as in my previous comment. – Animesh Porwal Nov 27 '13 at 23:17

1 Answers1

2

It seems like, KMCSDK.framework has already declared an AppDelegate class, if you can not modify the source code of KMCSDK.framework and rebuild it, you should rename AppDelegate in your project to fix this problem.

shanegao
  • 3,562
  • 1
  • 18
  • 21