Important
... should've known that Lua is already present in devkitPro's portlibs š« . But with this method you have control over the version you want to use in your project.
- Download
lua.patchpresent in this repository. - Apply the patch within the installed Lua directory:
patch -p1 < lua.patch. - Built with
make. - Install with
sudo make install. You might need to usesudoas it installs to$DEVKITPRO/portlibs/3ds. You can change this behavior by modifying theMakefile.
Assuming you are using the devkitPro Makefile template located at $DEVKITPRO/examples/3ds/templates/application/Makefile modify it to link the Lua library.