编译ios平台的openssl
2011-11-28 11:53
495 查看
发现一个不错的地方介绍如何在ios平台下编译openssl,试用了一下,成功了。
需要注意的一点是,需要用openssl1.0编译,同时编译出来的文件生成在openssl目录下面:libCrypto.a libssl.a
https://github.com/sjlombardo/openssl-xcode
In a normal case you would use it thusly:
Download the OpenSSL source code directly from http://www.openssl.org/source/
Clone the openssl-xcode git repo to make a local copy
Either: a. Put the downloaded OpenSSL source tar.gz into the same folder as openssl.xcodeproj.
b. Place an extracted OpenSSL distribution in a folder called 'openssl' within the same folder as openssl.xcodeproj c. Extracted the OpenSSL distribution directly into the same folder as openssl.xcodeproj. d. Setup a source tree definition in XCode for OPENSSL_SRC
pointing the folder containing openssl source code
Then, either open openssl.xcodeproj in XCode and initiate a build, or integrate it within another project:
Drag the openssl.xcodeproj file into your main project
Right-click on your project target, and add openssl.xcodeproj under "Direct Dependencies" on the General tab.
On the Build tab for your project's target, find the "Header Search Paths" option, and add the path: >
(Assuming you've put openssl.xcodeproj at the path Library/openssl, and are building from a source tarball) 4. Expand your target's "Link Binary With Libraries" build stage, and drag libcrypto.a from the openssl.xcodeproj group.
This project actually relies on the OpenSSL configure and make system to build the libraries. However, it does attempt to automatically detect and use the appropriate build settings for arch (i386/ppc/armv6), build tools, and SDK directories. This makes it
appropriate for inclusion as a project reference into an iPhone application project. This project will also check to see if the resulting crypto library is newer than the project Makefile to avoid time consuming rebuild cycles.
需要注意的一点是,需要用openssl1.0编译,同时编译出来的文件生成在openssl目录下面:libCrypto.a libssl.a
https://github.com/sjlombardo/openssl-xcode
Usage
In a normal case you would use it thusly:Download the OpenSSL source code directly from http://www.openssl.org/source/
Clone the openssl-xcode git repo to make a local copy
Either: a. Put the downloaded OpenSSL source tar.gz into the same folder as openssl.xcodeproj.
b. Place an extracted OpenSSL distribution in a folder called 'openssl' within the same folder as openssl.xcodeproj c. Extracted the OpenSSL distribution directly into the same folder as openssl.xcodeproj. d. Setup a source tree definition in XCode for OPENSSL_SRC
pointing the folder containing openssl source code
Then, either open openssl.xcodeproj in XCode and initiate a build, or integrate it within another project:
Drag the openssl.xcodeproj file into your main project
Right-click on your project target, and add openssl.xcodeproj under "Direct Dependencies" on the General tab.
On the Build tab for your project's target, find the "Header Search Paths" option, and add the path: >
$(SRCROOT)/Library/openssl/build/openssl.build/openssl/include
(Assuming you've put openssl.xcodeproj at the path Library/openssl, and are building from a source tarball) 4. Expand your target's "Link Binary With Libraries" build stage, and drag libcrypto.a from the openssl.xcodeproj group.
This project actually relies on the OpenSSL configure and make system to build the libraries. However, it does attempt to automatically detect and use the appropriate build settings for arch (i386/ppc/armv6), build tools, and SDK directories. This makes it
appropriate for inclusion as a project reference into an iPhone application project. This project will also check to see if the resulting crypto library is newer than the project Makefile to avoid time consuming rebuild cycles.
相关文章推荐
- 编译 iOS 平台使用的openssl库
- ios 编译openssl支持arm64
- [Cocoa,医疗]在iOS平台上编译DCMTK
- ios 平台下cocos项目编译选项
- 编译ios版本的librtmp+openssl
- 编译ios版本的librtmp+openssl
- Xcode环境下osip,eXosip, openssl的静态库编译方法(编译出来给IOS使用)
- 在Android 2.3 平台下编译CURL 和OpenSSL过程
- cocos2d-js 3.0 ios平台编译打包
- [iOS]在 iOS 平台上编译 DCMTK
- [iOS]FFmpeg框架在iOS平台上的编译和使用
- 编译iOS libevent + openssl + tor
- mac编译iOS版openssl
- 抽取WebRTC的音频编解码库iLBC在iOS平台编译成静态库
- ios平台speex的编译和使用
- Poco C++ ios 和 android平台编译脚本
- ios 编译openssl支持arm64(转)
- Xcode环境下osip,eXosip, openssl的静态库编译方法(编译出来给IOS使用)
- cocos2d-js 3.0 ios平台编译打包