How to compile Lua 5.3.0 as an iOS static library
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 under Derived 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:
1 2 3 |
lipo -create ./Build/Products/Debug-iphoneos/liblua.a ./Build/Products/Debug-iphonesimulator/liblua.a -output liblua.a |
1 Comment to How to compile Lua 5.3.0 as an iOS static library
If you could make these genuinely believe that you’re weakened when you’re
not, they set for a hazardous capture.
Leave a comment
About Dennis D. Spreen
Search
Recent Posts
- Please make inline vars usable for production – fix RSP-22158
- How to compile Lua 5.3.5 for Windows
- Better Collada exporter for Blender with custom properties
- MOS6502-delphi – a MOS 6502 CPU emulator for Delphi
- Pass a multidimensional array as a parameter (with a hidden caveat)
- Behavior3 client library for Delphi (Behavior Trees for Delphi)
- LibBLP v1.0 – A BLP image reader library for Delphi 10.1 Berlin+ with DXT3/5 decompression support
- Convert your Gamebase64 C64 ROM files to Emulationstation (RetroPie & Recalbox) format
- How to fix the “api-ms-win-crt-runtime-l1-1.0.dll is missing” error for Delphi 10 Seattle
- VerySimple.Lua 2.0 – a cross-platform Lua 5.3.0 wrapper for Delphi XE5-10.1 Berlin
Categories
Tags
Archives
- November 2019
- June 2019
- March 2017
- August 2016
- July 2016
- June 2016
- January 2016
- September 2015
- February 2015
- January 2015
- October 2014
- September 2014
- August 2014
- May 2014
- March 2014
- February 2014
- November 2011
- June 2011
- February 2011
- March 2010
- September 2009
- August 2009
- July 2009
- May 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- February 2008
- June 2007
Delphi Feeds
- Installer Amiga 68k December 15, 2019
- Engine improvements: GtkGLExt no longer used, new TCastleInspectorControl, loading optimizations, TwoSidedMaterial node December 15, 2019
- Installer OS4 December 14, 2019
- Adding Tools into the IDE December 13, 2019
- New Style-Designer Software December 13, 2019
- 70. No Solo Delphi Live December 13, 2019
- IBX QP Issues Addressed in RAD Studio 10.3.3 December 13, 2019
- Introducing DPM - a Package Manager for Delphi December 13, 2019
- Accessing bitmap pixels with less ScanLine[] calls in Delphi December 12, 2019
- Android 64 Bit device list. December 12, 2019
February 1, 2019