【转】编译Lua5.3.0的iOS静态库
2018-06-17 18:58:26来源:未知 阅读 ()
This is a tutorial on how to compile Lua 5.3.0 as an iOS static library (liblua.a) on Mac OS X 10.10.2 Yosemite with Xcode 6.1.1.
1. Download and extract Lua 5.3.0 to a folder of your choice.
2. Start Xcode and Create a new Xcode project -> iOS -> Framework & Library -> Cocoa Touch Static Library, then choose lua as the Product Name and create the project
3. Now on the left pane delete the lua.h and the lua.m file (Move to Trash), then right click on the now empty lua folder and choose Add Files to “lua” and select the src\ folder of the extracted lua source.
4. Open the newly added src folder in the left pane and delete lua.c, luac.c and makefile(Remove Reference) as these would build the standalone interpreter and compiler (which we won’t need).
5. Change the output folder with File -> Project Settings and click the Advanced… button underDerived Data Location then choose Custom and set it to Relative to Workspace
6. Click on the lua project file (subtitled with “2 targets”) on the top left, expand the content pane by clicking on the expand icon and with a right click delete the target luaTests. Delete the folder luaTests (Move to Trash) on the left, too.
7. Set Release build with Product -> Build For -> Running
8. You may need to set a Code Signing Identy (under Code signing) and adjust the iOS Deployment target (under Deployment) to your needs.
9. Hit the compile button, you should now have a liblua.a in the Build/Products/ folder.
How to put the ios and iossim static library files into one library
After building both static libraries you may want to put the ios and iossim libraries into one library – containing both armv7 and ios vm x86/64 code:
lipo -create ./Build/Products/Debug-iphoneos/liblua.a ./Build/Products/Debug-iphonesimulator/liblua.a -output liblua.a
原地址:http://blog.spreendigital.de/2015/02/09/how-to-compile-lua-5-3-0-as-an-ios-static-library/
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Delphi 10.3 Rio + iOS 12.1 SDK 编译错误 "libcha 2018-11-29
- Xamarin.iOS开发初体验 2018-06-17
- 在VS2012下不安装VS2010编译VS2010的工程 2018-06-17
- C#程序集系列12,C#编译器和CLR如何找寻程序集 2018-06-17
- [体验编译原理]编写简易计算器 2018-06-17
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash