【转】编译Lua5.3.0的iOS静态库
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了【转】编译Lua5.3.0的iOS静态库,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1981字,纯文字阅读大概需要3分钟。
内容图文
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/
原文:http://www.cnblogs.com/crymm/p/5610908.html
内容总结
以上是互联网集市为您收集整理的【转】编译Lua5.3.0的iOS静态库全部内容,希望文章能够帮你解决【转】编译Lua5.3.0的iOS静态库所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。