1

I am trying to use a framework in my app (CoreBitcoin). Followed the build instructions from the README and copied the framework directory into my project. I also linked it in the Build Phases -> Link Binary With Libraries.

Now the code compiles and works

#import <CoreBitcoin/CoreBitcoin.h>

// I can instantiate class objects and use functions such as 
BTCKey *newKey = [[BTCKey alloc] init];
[newKey setPublicKey: nil];

But if I try to use any global function such as

BTCDataFromBase58(@"anystring");

The linker throws an error:

Undefined symbols for architecture i386:
"BTCDataFromBase58(NSString*)"

I have looked around and tried many solutions to fix this error: the framework is in my search paths, I disabled bitcode and fiddled a bunch with the project build settings, however, it is strange that the undefined symbols are specific to global functions.

I am using Xcode 7.2, and get the warning:

(CoreBitcoin library path) was built for newer iOS version (9.2) than being linked (7.1)
hphu
  • 171
  • 12
  • Possible duplicate http://stackoverflow.com/questions/31843900/xcode-7-warnings-object-file-was-built-for-newer-ios-version-than-being-linked – user1079052 Feb 03 '16 at 16:08
  • The other question is only getting compiler warnings whereas I am getting an error that is failing the build. – hphu Feb 03 '16 at 16:10
  • Add i386 architecture and try again – Hima Feb 05 '16 at 13:14
  • Tried adding i386 to valid architecture under build settings but still got the same error. – hphu Feb 09 '16 at 16:45

0 Answers0