Zek
Zek

Reputation: 254

XCode 7.3.1, "Undefined symbols for architecture arm64"

I have a Swift 2.x app that I am trying to use this Obj-C library with: https://github.com/lmirosevic/GBPing

I have added the header file to my bridging header:

#import "GBPing-master/GBPing/GBPing.h"

When I am trying to build, I get this linker error:

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_GBPing", referenced from: type metadata accessor for __ObjC.GBPing in Pinger.o "_OBJC_CLASS_$_GBPingSummary", referenced from: type metadata accessor for __ObjC.GBPingSummary in Pinger.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have searched for and found some posts about "symbols not found for architecture arm64" but have not been able to get this working. I am quite new to iOS development, so XCode & Swift are both fairly new to me (and I have never done Obj-C).

Since I am only using .h and .m files from this library, aren't the needed object files supposed to be built from these? So why is arm64 not supported and how can I fix it?

Basically, I just need help getting this GBPing library to compile properly in my Swift app so that I can use it...

Notes: My "Other Linker Flags" setting is empty, but I did try adding $(inherited), which did not help. I do not want to remove arm64 as an architecture. Lastly, this is an Enterprise app that will only run on iPad Air 2 and iPad Mini 4 (iOS 9.2 and up)

Upvotes: 1

Views: 2863

Answers (1)

larva
larva

Reputation: 5148

Check your target Build Phases ->Compile Sources to make sure did compile for GBPing.m and GBPingSummary.m.

if not, just add all library .m file to Compile Sources.

Upvotes: 3

Related Questions