"Go" compile Lua5.3.0 's iOS static library

Source: Internet
Author: User

This was a tutorial on what 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 Stati C 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 Righ T click on the now empty Lua folder and choose Add Files to "LUA" and select the src\ Folde R of the extracted Lua source.

4. Open The newly added src folder in the left pane and delete lua.c, luac.c and m Akefile(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 und ErDerived 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-and Running

8. need to set a code Signing identy (under Code Signing) and adjust the IOS Deploy ment Target (under Deployment) to your needs.

9. hit the Compile button, you should now has 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 if want to put the iOS and Iossim libraries into one Libra Ry–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

Original address: http://blog.spreendigital.de/2015/02/09/how-to-compile-lua-5-3-0-as-an-ios-static-library/

"Go" compile Lua5.3.0 's iOS static library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.