0

I'm working on xCode 6.3. I attached external library on my application. I researched this issue so long. I tried whole solutions. But they didn't help. Changing scheme name, removing paths, adding/removing architectures...I got this error:

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

My settings:

Valid architecture: armv7 armv7s arm64 Architectures: armv7 arm64 Build Active Architecture : No

By the way, there is no TLFApplicationHelper.m and TLFCustomEvent.m. They are TLFCustomEvent.h and TLFApplicationHelper.h.

When I set Build Active Architecture Only as No, error messages are like that:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_TLFApplicationHelper", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_TLFCustomEvent", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Atacan
  • 55
  • 8
  • tried this one http://stackoverflow.com/questions/22328882/xcode-5-1-no-architectures-to-compile-for-only-active-arch-yes-active-arch-x – johny kumar Jul 06 '15 at 09:20
  • The Library you added not supported for iPhone Simulator. Try to run this on real device. – Kathiravan G Jul 06 '15 at 09:20
  • Are you sure you added the library file in the project also make sure that "TLFApplicationHelper" supports i386 architecture? If it not supporting i386 Please try with a device. – rejusss Jul 06 '15 at 09:25
  • I don't use CocoaPods. I know this library is supoorted for iphone Simulator. it is supoorted for i386 and x86_64. I think we miss something different. But I don't know what it is. – Atacan Jul 06 '15 at 10:56

1 Answers1

0

Just guessing, May be you are missing to link some frameworks required by the library. You should either add them as dependency in the podspec or link the framework in your main project.

Subbu
  • 2,138
  • 14
  • 20
  • I checked it. It was missing to link a framework required by the library. It made me crazy. Thank you very much. – Atacan Jul 07 '15 at 06:04