How to compile Lua 5.4.0 as a Mac OS X dynamic library

Sunday, May 24th, 2020 | Dennis D. Spreen | Lua, Mac OS X

This is a tutorial on how to compile Lua 5.4.0 as a Mac OS X dynamic library (liblua.dylib).

This tutorial on how to compile Lua as a Mac OS X dynamic library resulting in a liblua5.4.0.dylib is based on the instructions provided by Adrian Perez – thank you!

1. download and build Lua as stated in the Lua FAQ but force a 64-bit compilation

2. add a new dynamic build rule to the src/makefile and build the library with

See Frameworks and Binding for information about the install_name.
You’re done! You should now have a lua interpreter, a luac compiler and a liblua5.4.0.dylib.

Tags: , , , ,

About Dennis D. Spreen

I'm an avid programmer working on a variety of platforms in a variety of languages with a wide technical interest.

Search

QR Code

Categories