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