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.cluac.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/

【转】编译Lua5.3.0的iOS静态库的更多相关文章

  1. iOS静态库及Framework 创建

    本文转自cocoachina,尊重作者的汗水. 讲述的非常透彻,有需要的朋友可以阅读实践.转载请注明出处 //=================以下留着备份==================// 在 ...

  2. iOS静态库.a文件制作和导入使用

    iOS静态库.a文件制作: 1.新建Cocoa Touch Static Library工程 新建工程 - 选择iOS-FrameWork&Libary,选择 Cocoa Touch Stat ...

  3. iOS 静态库和动态库的区别&静态库的生成

    linux中静态库和动态库的区别 一.不同 库从本质上来说是一种可执行代码的二进制格式,可以被载入内存中执行.库分静态库和动态库两种. 1. 静态函数库 这类库的名字一般是libxxx.a:利用静态函 ...

  4. iOS 静态库,动态库与 Framework 浅析

    静态库与动态库的区别 首先来看什么是库,库(Library)说白了就是一段编译好的二进制代码,加上头文件就可以供别人使用. 什么时候我们会用到库呢?一种情况是某些代码需要给别人使用,但是我们不希望别人 ...

  5. iOS - 静态库的创建与使用

    在日常项目开发中,不论是为了两个公司项目上的业务交流还是为了减少项目的编译时间,有的时候我们会把项目中的私密内容打包成静态库,或者是把项目中变动较少一部分打包成静态库以便提高编译效率,那么下面我们就来 ...

  6. ios 静态库冲突的解决办法

    最近在做一个 iOS 的 cocos2d-x 项目接入新浪微博 SDK 的时候被“坑”了,最后终于顺利的解决了.发现网上也有不少人遇到一样的问题,但是能找到的数量有限的解决办法写得都不详细,很难让人理 ...

  7. 【转】iOS静态库 【.a 和framework】【超详细】

    原文网址:https://my.oschina.net/kaqijiang/blog/649632 一.什么是库? 库是共享程序代码的方式. 库从本质上来说是一种可执行代码的二进制格式,可以被载入内存 ...

  8. iOS 静态库和动态库(库详解)

    什么是库 ? 库就是程序代码的集合,将N个文件组织起来,是共享程序代码的一种方式.库从本质上来说是一种可执行代码的二进制格式,可以被载入内存中执行. 库的分类 开源库:源代码是公开的,可以看到每个实现 ...

  9. iOS静态库 ---iOS-Apple苹果官方文档翻译

    iOS静态库 ---iOS-Apple苹果官方文档翻译 •什么是库? 库是共享程序代码的方式,一般分为静态库和动态库.静态库与动态库的区别? 静态库:链接时完整地拷贝至可执行文件中,被多次使⽤用就为什 ...

随机推荐

  1. ASP.NET MVC3 模板页的使用

    占位符的使用: 下面是一个模板页 _Layout.cshtml <!DOCTYPE html> <html> <head> @RenderSection(" ...

  2. Liferay7 BPM门户开发之39: Form表单提交的ProcessAction处理

    在v6.2开始后,需要设置<requires-namespaced-parameters>false</requires-namespaced-parameters>  来避免 ...

  3. Visual Studio Emulator for Android 里面的安卓模拟器如何启用

    打开软件

  4. 【WP8.1开发】基于应用的联系人存储

    上一篇文章所吹的牛是访问系统(手机)上的联系人,当然那只是读不能改,这是自然的,要是让你能随便修改用户的联系人信息的话,那后果很严重,有些恶意开发者就有可能把”你的户口改成猪“. 但是,API也允许应 ...

  5. Oracle参数篇

    1. ARCHIVE_LAG_TARGET forces a log switch after the specified amount of time elapses.有效值为0(disabled) ...

  6. Cocos2d-x 3.2 学习笔记(六)Layer

    Layer 游戏中的背景容器,Layer类是Node类的一个子类,它实现了触屏事件代理(TouchEventsDelegate)协议. LayerColor是Layer的一个子类,它实现了RGBAPr ...

  7. 解决erlang节点启动失败报["inet_tcp",econnrefused]的问题

    今天有同事说他机器上的leofs启动不了.我用console起了一下,发现报如下错: {error_logger,{{2015,11,3},{6,23,6}},"Protocol: ~tp: ...

  8. Windows Azure Cloud Service (12) PaaS之Web Role, Worker Role, Azure Storage Queue(下)

    <Windows Azure Platform 系列文章目录> 本章DEMO部分源代码,请在这里下载. 在上一章中,笔者介绍了我们可以使用Azure PaaS的Web Role和Worke ...

  9. redis学习之二from github

    大概敲了一遍基本命令,熟悉了redis的存储方式.现在开始进一步系统的学习.学习教程目前计划有三个,一个是github上的https://github.com/JasonLai256/the-litt ...

  10. 基于HTML5的WebGL电信网管3D机房监控应用

    先上段视频,不是在玩游戏哦,是规规矩矩的电信网管企业应用,嗯,全键盘的漫游3D机房: http://www.hightopo.com/guide/guide/core/3d/examples/exam ...