IOS下Libevent编译步骤,及引入Xcode备忘
来源:互联网 发布:位面淘宝txt下载 编辑:程序博客网 时间:2024/06/06 09:49
0.先用:ls -al /usr/lib | grep libevent 查看是否已安装,如果已安装且版本低于1.3,则先通过:rpm -e libevent —nodeps 进行卸载。
1.下载libevent安装包:libevent-2.0.22-stable.tar.gz,然后解压。
2.切换到解压后的 libevent 主目录:cd libevent-2.0.22-stable
3.依次执行:
./configure –prefix=/usr (或 ./configure --program-prefix=/usr)
make
make install
----ARM64
./configure --prefix=/Users/XX/lv --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc CFLAGS="-arch arm64 -pipe -std=c99 -Wno-extended-offsetof -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk" AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar LDFLAGS="-arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk -miphoneos-version-min=6.0"
---lipo
1.下载libevent安装包:libevent-2.0.22-stable.tar.gz,然后解压。
2.切换到解压后的 libevent 主目录:cd libevent-2.0.22-stable
3.依次执行:
./configure –prefix=/usr (或 ./configure --program-prefix=/usr)
make
make install
----ARM64
./configure --prefix=/Users/XX/lv --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc CFLAGS="-arch arm64 -pipe -std=c99 -Wno-extended-offsetof -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk" AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar LDFLAGS="-arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk -miphoneos-version-min=6.0"
---lipo
lipo -create /Users/XX/lv/lib/libevent_pthreads.a /Users/XX/build/built/iPhoneOS10.0-arm64.sdk/lib/libevent_pthreads.a -output /Users/xx/lv-all/libevent_pthreads.a
*注意替换路径
生成IOS平台的库文件(libevent_core.a,libevent_extra.a,libevent_pthreads.a)放到$path/ios/libraries中,注意:是IOS的库文件,不是linux的
头文件放到$path/ios/libevent
xcode中增加head search path 和 添加刚才的3个库文件
阅读全文
0 0
- IOS下Libevent编译步骤,及引入Xcode备忘
- linux下libevent及mysql的编译
- windows下编译及使用libevent
- windows下编译及使用libevent
- windows下编译及使用libevent
- windows下编译及使用libevent
- windows下编译及使用libevent
- VS2013 windows下编译及使用libevent
- windows下编译及使用libevent
- windows下编译及使用libevent
- 【云隐】windows下编译及使用libevent
- Windows下编译libevent
- Windows下编译libevent
- 编译iOS libevent + openssl + tor
- ios编译freetype2备忘
- libevent 库windows下编译
- windows下libevent VS2012编译
- libevent在vs下编译
- 函数
- MySql主从同步配置过程
- c++设计模式之工厂模式
- 动态规划之线性动规钢条切割问题
- ros中2D_Slam说明: turtlebot+kinect改写成turtlebot+laser(hokuyo)
- IOS下Libevent编译步骤,及引入Xcode备忘
- Intelij导入maven项目并部署到tomcat
- java动态代理
- 阅读源代码的感想
- java8新特性 Lambda表达式详解
- Photoshop-设计导航
- Android删除手机本地图片并同步到本地图片媒体库
- mysql 存储过程、游标及逐行处理的配合使用
- BZOJ 1673: [Usaco2005 Dec]Scales 天平 启发式搜索