Main /
Lua BuildThis came from a Lua Developers thread on how to build things for Lua Use the same (similar) toolchain on all platforms, this would be the GNU based build tools: 1.) Linux: already included in distributions 2.) Windows: MSYS 2? (https://www.msys2.org/) 3.) Mac OS: brew (https://brew.sh/) Example commands for limath: =============================
wget https://web.tecgraf.puc-rio.br/~lhf/ftp/lua/ar/limath-103.tar.gz tar xzf limath-103.tar.gz cd limath-103
INC=/usr/include/lua EXT=so ADD= INC=/mingw64/include/ EXT=dll ADD=/mingw64/bin/lua54.dll INC=/usr/local/include/lua EXT=so ADD="-undefined dynamic_lookup"
gcc -shared -fPIC -I $INC -I src limath.c src/imath.c $ADD -o imath.$EXT |