When compiling Lua in Linux, I usually use make generic. In this way, compilation is fine and all programs running Lua are OK. However, this way, the external C dynamics are loaded.
Links to the library, but always reports the following errors
Dynamic libraries not enabled; check your Lua Installation
After searching the data for half a day, we finally found that if we use make generic to compile Lua, we could not dynamically link it.
Therefore, you can choose to use other platform parameters and make Linux for compilation to load external dynamic link libraries,
However, when you use make Linux, the system will report a missing Readline. h error, so you only need to go to the Readline official website.
Download the latest Readline package ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz
After downloading, go to the directory where the compressed package is downloaded,
Input tar-zxvf compressed package
Go to the decompressed directory. Enter./configure
After./configure is executed, run the make command.
After make is executed, enter make install. Note that you must enter the root permission when executing this step.
Run make Linux in The Lua source code directory.
At this time, the external dynamic link library will be loaded and everything will be OK.