【issue】支付宝SDK集成:openssl/asn1.h file not found

#include <openssl/asn1.h> 这个地方报错 openssl/asn1.h file not found

原因引用 http://www.cocoachina.com/bbs/read.php?tid-265337.html 7楼说的很好,看懂了,以后类似的问题都可以解决:

官方文档说需要 对“Header Search Paths”增加头文件路径:$(SRCROOT)/项目名 称
照着做了还是出现 openssl rsa.h file not found ,后来百度了很多地方都没有找到能解决的方法。
后来突然回想起# include<>跟# include""的区别后,终于找到原因了。
比如 我把openssl这个文件导入到了这个工程目录下 :项目名称/公共类/工具&第三方/支付宝SDK/openssl  ,中间隔了三个文件夹,
那么在Header   Search Paths 的设置就得改为 $(SRCROOT)/项目名 称/公共类/工具&第三方/支付宝SDK,问题就解决了
再反过来看官方的demo,原来他们把openssl这个文件放到了项目根目录下,所以“Header Search Paths”只需要设置$(SRCROOT)/项目名称

posted @ 2015-06-10 14:34  _yfan  阅读(4008)  评论(0编辑  收藏  举报