iOS工程集成支付宝错误Undefined symbols for architecture armv7

问题描述:

新工程中需要集成支付宝功能,于是咱就把支付宝的库给集成了进入然后就出现了下面这种错误了说,错误信息如下:

Undefined symbols for architecture armv7:
  "CreateRSADataVerifier(NSString*)", referenced from:
      -[AppDelegate parseURL:application:] in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

问题原因:

我的支付功能是写在Appdelegate.m里面给全局调用的,而该文件在前面集成百度地图的时候已经把后缀名改为Appdelegate.mm样式的了0.。0,我在该文件中调用了DataSigner.m里面的一个方法,就会报这个错误= =

ps.我的compile sources as 是设置为according to file type。(这个我没改过,默认的)

我的解决:

把DataSigner.m也改成DataSigner.mm后缀,你也可以换着来改也行,好吧就是这样 0.。0

参考:http://www.cnblogs.com/ios-wmm/p/3362961.html

原文地址:https://www.cnblogs.com/tate-zwt/p/4815862.html